Tech Notes

This is my personal user-experience notes of using Linux Distributions, GNU softwares, scripting and Web development. The contents such as wikis, commands, codes, etc. on this page and sub pages are supposed to be used by your own consideration at your own risk. So, doing your own research and climbing learning curve is recommended. I am not responsible for anything bad happened to you or your computing system due to using any content from here.

Archlinux Notes

Signing Error of System Upgrading

Upgrading the system regularly running $ sudo pacman -Syu prevents most signing errors. If delay is unavoidable and system upgrade gets delayed for an extended period, manually sync the pacakge database and upgrade the archlinux-keyring package before system upgrade. Basically it is syncing the package database and installing archlinux-keyring package just before the system upgrade. See the following command;

~
# pacman -Sy archlinux-keyring && pacman -Su

Failed to init transaction (unable to lock database)

When pacman is about to alter the package database, for example installing a package, it creates a lock file at /var/lib/pacman/db.lck. This prevents another instance of pacman from trying to alter the package database at the same time. If pacman is interrupted while changing the database, this stale lock file can remain. If you are certain that no instances of pacman are running then delete the lock file:

Calibri Cambria Fonts Linux

Calibri font is default body font in MS Word. Sometime you may need to install Calibri and Cambria fonts for opening MS Office files with LibreOffice in Linux.

To install the fonts, you can look at https://wiki.archlinux.org/title/Microsoft_fonts. But the easiest and cleanest way is to install Carlito and Caladea fonts. Both are metrically compatible with Calibri and Cambria respectively. They are available in Linux. In Arch Linux, ttf-carlito and ttf-caladea packages are provided.

Disable Drag Lock DWL

Disabling drag_lock function in dwl is recommended if you are experiencing half a second delay on releasing mouse button simulated by touchpad.

For example, it takes half a second for cursor to reset its shape after doing any drag action like moving or resizing window using touchpad.

To disable that behaviour, it is easy. Just disable static const int drag_lock function by setting its value to 0 in config.h file.

~
/* Trackpad */
static const int tap_to_click = 1;
static const int tap_and_drag = 1;
/* to disable the following drag_lock function, just set its value to 0. Default is 1. */
static const int drag_lock = 0;
static const int natural_scrolling = 0;
static const int disable_while_typing = 1;
static const int left_handed = 0;
static const int middle_button_emulation = 0;

What Package Provides What Command

Sometime we just want to know which package is a command provided by? For instance, which package provides pactl command. Then use pacman in Arch Linux.

~
[user@hostname ~]$ pacman -Qo pactl
/usr/bin/pactl is owned by libpulse 17.0-3

And for it path,

~
[user@hostname ~]$ pacman -F pactl
extra/libpulse 16.1-6 [installed: 17.0-3]
    usr/bin/pactl
    usr/share/bash-completion/completions/pactl

Arch Wiki pacman and Pacman Manual man page.
Arch Wiki Tips and Tricks of pacman
Arch Forum Which package provides the executable