export
ICAROOT=/opt/Citrix/ICAClient
Copy files in
/usr/share/ca-certificates/mozilla/* to
$ICAROOT/keystore/cacertsRehash the certificate by the following command: $ICAROOT/util/ctx_rehash
- Reopen Citrix Receiver.
Sunday, May 9, 2021
Make Citrix work in Linux
Sunday, February 21, 2021
Logitech Speakerphone with Linux Mint
My Logitech USB Speakarphone has stopped working since I did something wrong (which I don't remember). Various troubleshooting and zillions of searches on the Internet did not fix the issue, until today.
The issue was the device did not make any sound at all. Checking via ALSA and Kernel log said everything was fine as shown below:
$ lsusb
...
Bus 002 Device 011: ID 046d:0a06 Logitech, Inc.
Bus 002 Device 009: ID 046d:c51c Logitech, Inc.
$ inxi -A
Audio: Device-1: Intel 82801I HD Audio driver: snd_hda_intel
Device-2: ViXS Systems XCode 2100 Series driver: N/A
Device-3: AMD Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] driver: snd_hda_intel
Device-4: Logitech type: USB driver: snd-usb-audio
Sound Server: ALSA v: k4.15.0-135-generic
Friday, February 19, 2021
Rename files with Regex rule
In Linux, there is very powerful tool to rename files based on pattern we specify. The pattern follows Perl-like regular expression.
For example, if I have files as follow:
01_-_bohemian_rhapsody_-_queen_-_greatest_hits_cd1.mp3
05_-_bicycle_race_-_queen_-_greatest_hits_cd1.mp3
"07_-_it's_a_hard_life_-_queen_-_greatest_hits_cd2.mp3"
09_-_who_wants_to_live_forever_-_queen_-_greatest_hits_cd2.mp3
11_-_the_miracle_-_queen_-_greatest_hits_cd2.mp3
15_-_friends_will_be_friends_-_queen_-_greatest_hits_cd2.mp3
16_-_the_show_must_go_on_-_queen_-_greatest_hits_cd2.mp3
16_-_we_will_rock_you_-_queen_-_greatest_hits_cd1.mp3
17_-_we_are_the_champions_-_queen_-_greatest_hits_cd1.mp3
and I want to rename them by replacing the "_-_" part to be just "-". The single command to do that is:
$ rename -n -v 's/_-_/-/g' *
rename(01_-_bohemian_rhapsody_-_queen_-_greatest_hits_cd1.mp3, 01-bohemian_rhapsody-queen-greatest_hits_cd1.mp3)
rename(05_-_bicycle_race_-_queen_-_greatest_hits_cd1.mp3, 05-bicycle_race-queen-greatest_hits_cd1.mp3)
rename(07_-_it's_a_hard_life_-_queen_-_greatest_hits_cd2.mp3, 07-it's_a_hard_life-queen-greatest_hits_cd2.mp3)
rename(09_-_who_wants_to_live_forever_-_queen_-_greatest_hits_cd2.mp3, 09-who_wants_to_live_forever-queen-greatest_hits_cd2.mp3)
rename(11_-_the_miracle_-_queen_-_greatest_hits_cd2.mp3, 11-the_miracle-queen-greatest_hits_cd2.mp3)
rename(15_-_friends_will_be_friends_-_queen_-_greatest_hits_cd2.mp3, 15-friends_will_be_friends-queen-greatest_hits_cd2.mp3)
rename(16_-_the_show_must_go_on_-_queen_-_greatest_hits_cd2.mp3, 16-the_show_must_go_on-queen-greatest_hits_cd2.mp3)
rename(16_-_we_will_rock_you_-_queen_-_greatest_hits_cd1.mp3, 16-we_will_rock_you-queen-greatest_hits_cd1.mp3)
rename(17_-_we_are_the_champions_-_queen_-_greatest_hits_cd1.mp3, 17-we_are_the_champions-queen-greatest_hits_cd1.mp3)
(the argument "-n" above is to tell rename not to actually perform renaming, but just to display what it would do). I use "/g" in the regular expression to tell it to rename all occurrences of "_-_" throughout the file name, not just for the first time it encounters it.
Linux script to display Some information of MP3 files
The following bash script utilizes mediainfo command line to retrieve various metadata inside an MP3 (or any media file, in fact):
#!/bin/sh i=0 for f in "$@" do i=$((i+1)) printf "%d," $i mediainfo --Inform="General;%CompleteName%,%Format%,%OverallBitRate_Mode%,%BitRate%,%FileSize/String4%" "${f}" done
For example (I put the above into a script named 'bitrate.sh'):
1,01_-_bohemian_rhapsody_-_queen_-_greatest_hits_cd1.mp3,MPEG Audio,CBR,256000,10.94 MiB
2,05_-_bicycle_race_-_queen_-_greatest_hits_cd1.mp3,MPEG Audio,CBR,256000,5.612 MiB
3,07_-_it's_a_hard_life_-_queen_-_greatest_hits_cd2.mp3,MPEG Audio,CBR,256000,7.620 MiB
4,09_-_who_wants_to_live_forever_-_queen_-_greatest_hits_cd2.mp3,MPEG Audio,CBR,256000,9.075 MiB
5,11_-_the_miracle_-_queen_-_greatest_hits_cd2.mp3,MPEG Audio,CBR,256000,9.002 MiB
6,15_-_friends_will_be_friends_-_queen_-_greatest_hits_cd2.mp3,MPEG Audio,CBR,256000,7.599 MiB
7,16_-_the_show_must_go_on_-_queen_-_greatest_hits_cd2.mp3,MPEG Audio,CBR,256000,8.048 MiB
8,16_-_we_will_rock_you_-_queen_-_greatest_hits_cd1.mp3,MPEG Audio,CBR,256000,3.741 MiB
9,17_-_we_are_the_champions_-_queen_-_greatest_hits_cd1.mp3,MPEG Audio,CBR,256000,5.542 MiB
Sunday, December 20, 2020
Plex Server inaccessible with LG TV nor Ipone
I recently had access issue to my Plex server (running on Linux). It was fine sometime ago, but lately everytime I tried to access it from my LG TV or my phone, they said the server was offline. I'd followed various instructions and troubleshooting I found on the Internet with no luck. Here is the list of steps I did:
- Ensure no VPN running on all devices and server
- Select "Preferred" for secure connection
- Added my private subnet in the "List of IP addresses and networks that are allowed without auth"
- Upgrade the Plex server to the latest
- Restart the server (e.g., "sudo service plexmediaserver restart")
- Verify I am able to access the server through its IP (e.g, http://192.168.1.103:32400)
- Enable DLNA server
- Revert the Plex on TV to last publicly available version
- Power down TV, wait 2 minutes and turn it back on
Turned out it was due to IPv6 connection was enabled on the Plex server! Once I disabled it, now I could watch my movies or stream my music to other devices. My LG TV apparently did not support IPv6 yet.
Saturday, November 14, 2020
My Indentation configuration
The content of $HOME/.indent.pro:
-as
-lp
-bad
-bap
-bbb
-bbo
-bli0
-nbc -c33 -cd33 -ncdb -nce -ci4 -cli0
-c4
-ncdw
-cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i8 -ip0 -l75 -lp -npcs
-nprs -npsl -saf -sai -saw -nsc -nsob -nss
-v