Skip to content

system

heredoc: Passing multiple lines of string

Use heredoc to pass the string as-is between two delimiters (e.g. EOF)

cat << "EOF" >> ~/.xprofile
# ~/.xprofile
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
ibus-daemon -drx
EOF

Will append the following lines in ~/.xprofile:

.xprofile
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
ibus-daemon -drx

Kill zombie processes

Find and kill zombie process(es). Source

ps axo stat,ppid,pid,comm | grep -w defunct

Kill parent process(es)

sudo kill -9 <ppid>

Check battery status

Open Windows Powershell with Administrator rights and run:

powercfg /batteryreport /output "C:\battery-report.html"

The report is at C:\battery-report.html.

Install fonts in Linux

Copy the fonts files to ~/.local/share/fonts/. Then, run fc-cache to rebuild fonts cache.

fc-cache -fv