Some electronic beat music:
A simple GUI for basic Package Management with Apt
2. Dezember 2024 in Administration, GNU/Linux, Programmierung, Technik.
The tool presented here, „Simple Apt Update“ (simple-apt-update) is nothing more than a front-end to the non-interactive execution of apt-get update|full-upgrade and apt list --upgradeable. It can look like this:
Utility to search for XDG Desktop Files
3. November 2024 in Administration, GNU/Linux, Programmierung, Technik.
In my previous article Print XDG Desktop Definition for Application i described a way to search the various „applications“ sub-directories of the known XDG data directories for .desktop-files that match certain search criteria.
The short shell script from that article is now available as a commandline utility, including the usual bells and whistles such as option parsing and a manpage. Also, it now supports more exact control over which directives in the desktop files are searched and which are displayed in the search results.
Here is an example searching for any desktop files containing „firefox“ in their „Name“or „Exec“ directives, displaying the „Name“, „Comment“ and „Exec“ directories of each result:
xdg-desktop-search -v -s Exec -s Name -d Name -d Comment -d Exec firefox
The utility is available here:
Gitea project xdg-desktop-searchLast 3 commits: by tilman: aff332d5 change exit codes by Tilman Kranz: 0eb7823f fix some warnings if searchdirs are missing by tilman: f7f760cb Update xdg-desktop-searchGetting Alerted on Expiring GPG Keys
3. August 2024 in Administration, GNU/Linux, Programmierung.
GnuPG is a powerful cryptographic tool that enjoys widespread support by F/LOSS mail user agents. However, due to a lack of conventional public key management it is plagued by key-related issues. One such issue is the expiry of GnuPG keys, which often goes unnoticed by affected messaging partners until such time when it actually disturbs messaging between them.
The way user agents handle key expiry situations can roughly be described as follows:
(i) If the GnuPG key of a sender of a message is expired, user agents can not regard it as valid, and the attempt to sign the message using the sender’s key will fail. Once the GnuPG key of a user has expired the user will realize this situation without an external alerting mechanism only when trying to sign a message.
(ii) If the GnuPG key of an intended recipient of a message is expired, user agents can not regard it as valid; the attempt to encrypt a message using an expired key of a recipient will fail. Also, the sending of an encrypted message to multiple recipients, where a subset of the recipients feature expired public keys, can be blocked. Other users will realize this situation once they try to send an encrypted message to the user in question.
In the proposed setup specific GnuPG keys (specified using a list of key IDs) stored in ~/.gnupg are scanned periodically. The scan is repeated daily, at 11 A.M. local time (which can be changed to whatever systemd timers support). The tolerated remaining validity will be set to „more than 30 days“ (this, too, can easily be set to a different value).
Installing r10k on a Foreman Server
4. August 2024 in Administration, GNU/Linux.
The following occurred to me on a recent version of Foreman (i used 3.9) on a recent version of Red Hat, Alma or Rocky Linux 8 (i used 8.9). I wanted to use r10k for management of Puppet environments. When i attempted installation of r10k
/opt/puppetlabs/puppet/bin/gem install r10k
i got the following error
/opt/puppetlabs/puppet/bin/gem install r10k
ERROR: Error installing r10k:
The last version of faraday (~> 2.0) to support your Ruby & RubyGems was 2.8.1.
Try installing it with `gem install faraday -v 2.8.1` and then running the
current command again
Some background: „Faraday“ is a Ruby HTTP client library and is used by r10k for accessing the Puppet Forge. The problem is that foreman still ships with Ruby 2.7, and recent versions of Faraday are not compatible with this (outdated) version of Ruby.
At the time of writing, Foreman is not compatible with Ruby 3 in general, preventing an upgrade, but an effort in that regard is underway on behalf of the Foreman developers. See here for remaining issues: Foreman Tracker #32684 „Ruby 3.0 support“.
Bottom line, the following kludge is a workaround that can be expected to go away in the foreseeable future:
/opt/puppetlabs/puppet/bin/gem install faraday -v 2.8.1
/opt/puppetlabs/puppet/bin/gem install r10k
Redirect PulseAudio/PipeWire over TCP/IP network
8. Oktober 2023 in Administration, GNU/Linux, Multimedia, Technik.
If you have two Linux hosts, host1 and host2, both running PulseAudio (or Pipewire with PulseAudio backwards compatibility) and you want host2 to use the speakers on host1, then you can use a PulseAudio TCP server on host1 and a „tunnel sink“ on host2 to do that.