General Q&A about Linux and Unix-like operating systems
Filters (None)
I have multiple screens and I often connect and disconnect monitors while the system is running. i3 assigns a workspace to each monitor, but does so unpredictably. Both workspaces are highlighted a...
I'm trying to run a pipeline to update a PDF after every push to the 'main' branch. I want it to be atomic, so it doesn't touch the existing PDF until it has finished, so I need to use sponge(1) (...
When hardening my system with Lynis I had information about /etc/issue and /etc/issue.net being found weak. Lynis redirects me to Enterprise, which is a paid product and a bit overkill for my home...
My VISUAL setup interferes with my cron jobs. crontab -l works all right, I see my previous jobs. crontab -e, crontab -e -u user-here - opens GVIM on an empty file checked cron.allow or .deny,...
What switches do I need to add to see my video RAM (VRAM) with inxi? inxi -G shows my video card model and other info, but not video RAM.
How can I rescale the Linux virtual terminals (ctrl + alt + {f1, f2, f3, f4, f5, f6}), so that a high-resolution display doesn't make the letters too small? I'd like to use 1080 or even 720 resolu...
Sorry it was a typo, _ instead of -, that caused the problem. I want to have a key combination to alter the keymaps. It worked with one for us and one for hu, but now I want to use one key combina...
Using For the console: /etc/vconsole.conf ---- KEYMAP=dvorak For X Session: .xinitrc ---- setxkbmap -layout us -variant dvorak & Problem For the console, it applies the dvorak lay...
Suppose I want to limit what characters are allowed in filenames. For example, I want file creation to fail if there is a \n in the name. Is there a way to enforce this? If it matters, I prefer a...
Is there a way in Ubuntu (22.04) to run a given bash command for a given Key combination in Gnome (42.9)? This Ubuntu is running in Hyper-V on a Win10 host. (I would like to run the setxkbmap us a...
I recently updated Gnome to 1:44.0 and since the update my dark mode settings seem to be ignored for Gnome applications. When setting the dark style in Settings > Appearance, the desktop backgr...
How to open a port when using firewalld as the system firewall?
I compressed some JPEGs with curtail it messed up the filenames. It was supposed to only add -min at the end but ended up adding a random string after the extension 😠: prs@PC:/DOWNLOADS/Pictures$ ...
Suppose I have a PDF which is 2x3 in. I want to create a PDF with a single page, which has multiple copies of this. For example, if the small pieces are in landscape, and the large page is in portr...
When you first connect to a host, ssh asks you about saving its fingerprint. If you do, on subsequent connections it will check the fingerprint and refuse to connect if it changed. I get that this...
I wrote a filter program to overwrite each line with the next one. $ cat /usr/local/bin/ovr #!/bin/sh sed '2,$s/^/\x1B[1A\x1B[K/'; Here's the behavior: $ echo | ovr $ echo 'foo' | ovr ...
I want to generate a list of trending Arch/AUR packages that focuses on user-facing applications rather than background libraries and dependencies. I wrote a script that uses the data from pkgstat...
I'm going to write some systemd services. All of these can only be run if a certain website is up. I thought I could create a ~/.config/systemd/user/website.service this: [Unit] Description=Confi...
MWE To reproduce: Add bindkey -v to your ~/.zshrc. Invoke python interpreter: python. Type something into the prompt without hitting ENTER: this = "this" + "that". Press ESC and try any vim ...
You often have to read man pages to use Linux/Unix software. However, many man pages are not easy to read. They are very long, not always conveniently arranged, and man does not appear to have any ...
I store my address book with abook(1). https://manpages.debian.org/bookworm/abook/abook.1.en.html Let's say I want to introduce some contact in some field that accepts the usual name <email>...
A little while ago I was helping someone with running Python in a virtual environment, as root, for some specific purpose. I determined easily enough that this requires explicitly specifying the pa...
Say I have some Bash function my-func, that expects a filename and does some processing on the corresponding file. For demonstration purposes, my-func() { cat "$1"; } If I want to apply that fu...
Why does XDG_DATA_HOME default to ~/.local/share? Why not something less cryptic, like ~/.data? Why did they decide use that path?
I installed the Nvidia container toolkit so I can use GPU acceleration in Docker containers. However, I can't get the containers to work: $ sudo docker run --runtime=nvidia nvidia/cuda:12.2.0-base...
Neomutt (and probably Mutt too, but I didn't try) seems to be hiding header fields from email, such as the Message-ID field, and fields that are added by SMTP servers when they receive the message....
flatpak uninstall --unused currently tells me that there is Nothing unused to uninstall. This seems wrong to me, based on the list of packages I see vs. the "root" packages I explicitly installed p...
I'm using the Gnome System Monitor in Linux Mint. Whenever I attempt to "End" or "Kill" a process, I am given this warning via a modal dialog (emphasis mine): Killing a process may destroy data,...
From what I can tell, both NixOS and Guix are built around a package manager which, instead of installing package into the "common environment" as is traditional, isolates them to mitigate issues a...
There are many GUI apps on my computer that show up as eg. items in the start menu. When I launch these, what if I want to control how exactly they are launched, such as setting environment variabl...
Spotify runs on my computer with higher DPI (bigger UI elements) than I'd like. How can I reduce it?
How can I search for files on my system? Ideally, I would like to search by various criteria, like date, name, extension, etc.
How do I configure my system so that all GUI apps use a consistent DPI, without configuring each app individually?
I am testing some DHCP stuff, and I want to manually end a lease so I don't have to wait hours for them to expire. How can I do this with OpenWrt?
How do I make my computer request a new IP from DHCP? I am using Arch with NetworkManager.
I have an Arch Linux machine connected to a LAN by ethernet. The router runs OpenWRT. DHCP assigns IPs to this machine like 192.168.1.* - quite typical. I want the IP to always be 192.168.1.10. I...
I am trying to run a DNS server on my LAN. I set it up where: Dnsmasq is the "initial" server that clients see Dnsmasq resolves internal domains, and handles overrides (such as if I want to blo...
Where can I find documentation on double asterisk in glob expansion? It is discussed in the .gitignore section of Pro Git. It works in ls **/* to list all terminal files. It is supported by py...
I have some bookmarked folders in GtkFileChooserDialog. I want to add these to my dotfiles. Where are the bookmarks stored?
How can I run a command later? I'm looking for a CLI way to schedule a command to be run later. I know that I could create a systemd timer, install it, activate it... That is too much work. I want...
I have an image (a photo) and I want to highlight certain parts of this. I want to do this from the CLI. I am planning to store the pixel coordinates of polygon vertices in a file, and when I run ...
Question How do you specify underscores as Vim word boundaries when using vim mode in either bash or zsh? MWE w on this_word should place the cursor on the underscore. A second w should place th...
I can start services with systemctl start. I can see logs with systemctl status or journalctl. But by the time I run the second the process has already started. I'd like to start a service and imme...
After a force shutdown on Ubuntu 22.04, installed on a Lenovo Legion 5, the OS seems to have lost its ability to recognize the built-in touchpad or to connect to the internet. For the backstory......
Guix is a rolling release distro. Another well known rolling release distro is Arch Linux. In Arch, you are expected to frequently do system updates. Partial updates are not supported. In my exper...
For some time pacman used to have a problem where: Occasionally Arch maintainers introduce new GPG keys They start signing packages with the keys Your local pacman doesn't receive these until ...
I like how Guix sounds based on what I've read, and I want to try it. However, my partitioning scheme is a bit complicated. With Guix it appears like my biggest concern is hardware (I will regretta...
Question How do I copy to clipboard from terminal with yy, assuming it's configured to use Vim bindings? I am using zsh with bindkey -v. MWE Enter something on the commandline (without pressi...
In Debian-based distributions, one can update the system with apt upgrade and cleanup unused dependencies with apt autoremove. Period. On Gentoo that is apparently not as straightforward. From G...