Skip to content

Blog

Change user directory

Use sudo and at to schedule the usermod command, which changes the user's home dir.

sudo at "now +5 minutes"  # Run the following commands in 5 minutes

In the at interface

usermod -m -d /new/home/path # Change user home dir (-d) and move (-m) the content into the new folder

Ctrl+D to exit the at interface. Logout, wait 10 minutes, and login.

See

Install AMD chipset driver Windows 11 24H2

How to solve the "AMD system not detected" error when installing AMD chipset driver in Windows 11 24H2.

Install VBS support: Settings > System > Optional features > Add "VBSCRIPT". You should be able to install the driver afterward.

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

Ubuntu 24.04 NTFS mount error

Ubuntu 24.04 (with kernel 6.8) may give an error while mounting NTFS partitions.

Solution: disable the open source ntfs3 driver and force Ubuntu to use the old ntfs-3g driver. Reboot to apply.

echo 'blacklist ntfs3' | sudo tee /etc/modprobe.d/disable-ntfs3.conf

Dynamic parallel matrix

Job matrix creates multiple job runs that are based on the combinations of the variables. Sometimes we want a dynamic number of matrix jobs, which requires a JSON array as an output. Here we use json and glob modules in Python to generate that JSON list.12