dt.iki.fi

64 posts are tagged "linux"

Time not synced

I noticed that my server's (Debian stable) datetime was way off. Years. Strange, because I was sure I had enabled systemd-timesyncd (but apparently never gave it a second thought after that). Looking at systemctl status systemd-timesyncd I found this cryptic message: ● systemd-timesyncd.service - Ne.....

Encrypt any block device

Goal A hard drive or a USB stick set up in this way is recognised by common filemanagers (e.g. Thunar, PCManFM) - it shows up as an encrypted device in the side bar, a password dialog pops up, and the twofold decrypt/mount process happens in one click. Device encryption, performance considerations W.....

Disable the Linux kernel watchdog

journalctl -b | grep watchdog; sudo dmesg | grep watchdog Both commands return something like NMI watchdog: Enabled. Permanently consumes one hw-PMU counter. I have no use for this watchdog on a desktop computer. This link already contains all the information required to disable it, but here's the m.....

Record system audio output with ALSA

This was written & tested on an Archlinux system, but I believe it applies to most Linux/ALSA systems. ALSA loopback device We assume a single run-of-the-mill Intel sound card, mapped as card 0. We will create a virtual loopback card 1. #> modprobe snd-aloop aplay -l The loopback device works.....

Disable a USB port and the connected hard drive

And enable it when required. Also see this related article. Premise & problem I have a USB hard drive used only for weekly automated backups. It is always connected to the same port and never gets removed. At all other times I want this drive to be unmounted, off, invisible, powered down. I wa.....

Openbox: change keybind action depending on active window

The situation under Xorg: I have an application with keybinds that cannot be changed, namely Signal for Linux desktop. One of these keybinds has been my probably most used keybind for a long time, namely Shift-Return to open an application launcher. Solution: Openbox allows me to execute different a.....

Creating Udev Rules

Scenario: Ignore a permanently connected backup drive Also see this related article. I have a WD USB drive - it's some cheapo variant, never get one of these! It's in an enclosure but can't be taken out and connected directly, like they used to, and suffers a lack of configurability as hdparm show.....

Restoring Mimetype Associations

I deliberately deleted all mime*.* files I could find in ~/.local/share/applications /usr/share/applications ~/.config I might also have deleted /usr/share/mime/mime.cache. I definitely deleted the directory ~/.local/share/mime (it seemed to contain stuff only related to WINE). I was hoping to fix s.....