Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Activity for matthewsnyder‭

Type On... Excerpt Status Date
Edit Post #289750 Initial revision 1 day ago
Answer A: Nvidia docker runtime: Failed to create task for container
I found a partial fix. You have to run: ``` sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml ``` After this, podman is able to run it: ``` sudo podman run --rm --device nvidia.com/gpu=all ubuntu nvidia-smi -L GPU 0: NVIDIA GeForce GTX 1060 3GB (UUID: GPU-...) ``` However, Docke...
(more)
1 day ago
Edit Post #289717 Post edited:
1 day ago
Edit Post #289749 Initial revision 1 day ago
Question Why does $XDG_DATA_HOME default to ~/.local/share?
Why does `XDGDATAHOME` default to `/.local/share`? Why not something less cryptic, like `/.data`? Why did they decide use that path?
(more)
1 day ago
Suggested Edit Post #289717 Suggested edit:

(more)
helpful 2 days ago
Suggested Edit Post #283940 Suggested edit:

(more)
pending 7 days ago
Comment Post #289649 That's not true, sometimes people search for system files.
(more)
7 days ago
Edit Post #289685 Initial revision 8 days ago
Answer A: What are the concrete security risks of forcibly terminating a process?
That sounds like bad design on the developers' part. There are many unavoidable ways a program may be terminated unexpectedly: Killed by an OOM killer Program crash Terminated by virus OS crash Computer lost power If these really do introduce a security risk, then it's very bad news fo...
(more)
8 days ago
Edit Post #289682 Post edited:
9 days ago
Edit Post #289682 Post edited:
9 days ago
Edit Post #289682 Initial revision 9 days ago
Question Nvidia docker runtime: Failed to create task for container
I installed the Nvidia container toolkit) so I can use GPU acceleration in Docker containers. However, I can't get the containers to work: ```sh $ sudo docker run --runtime=nvidia nvidia/cuda:12.2.0-base-ubuntu20.04 nvidia-smi docker: Error response from daemon: failed to create task for contain...
(more)
9 days ago
Edit Post #289654 Post edited:
13 days ago
Edit Post #289654 Initial revision 13 days ago
Question Are NixOS and Guix analogous projects?
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 arising from various dependency/version conflicts. Are there any significant differences between these...
(more)
13 days ago
Edit Post #289653 Initial revision 13 days ago
Answer A: How do I tweak the start parameters of GUI apps?
tl;dr: 1. Find the `.desktop` file that you are currently running 2. It is probably in a system location, so copy it to a user location 3. Modify the file contents The normal way to create icons for GUI apps on Linux is to create `.desktop` files. These are files describing the shell-styl...
(more)
13 days ago
Edit Post #289650 Post edited:
13 days ago
Edit Post #289650 Post edited:
13 days ago
Comment Post #289650 * https://linux.codidact.com/posts/288309 * https://linux.codidact.com/posts/285041
(more)
13 days ago
Edit Post #289651 Post edited:
13 days ago
Edit Post #289652 Initial revision 13 days ago
Answer A: How to fix DPI for Spotify
There's multiple, sometimes overlapping ways of altering the DPI globally on Linux. You should first ensure these are properly configured and Spotify is still not using them correctly. However, Spotify provides a `--force-device-scale-factor` argument for controlling DPI scaling. First, test it...
(more)
13 days ago
Edit Post #289651 Initial revision 13 days ago
Answer A: Suggestion: Basic Linux skills compendium
My thoughts on the matter are clear from the question, but I'll add some example topics that could be covered by this "basics compendium": A "curriculum" of sorts that lists all the basic topics in a logical order for people who want to try learning all or most of them Explanation of what a she...
(more)
13 days ago
Comment Post #289647 I don't have time for a full answer, but basically it's: 1. Find the `.desktop` file for the app (see https://linux.codidact.com/posts/289648) 2. Edit the file's `Exec` field etc. 3. Note the difference between `.desktop`s under system paths like `/usr/share` and user paths under `~`.
(more)
13 days ago
Edit Post #289650 Initial revision 13 days ago
Question Suggestion: Basic Linux skills compendium
We are all Linux users and enthusiasts on this site, as well as caring about FOSS. Although technically this is a site for technical Q&A, I think some level of Linux activism is possibly beneficial, in the sense of helping newbies "get into Linux". It should not be our job to convince people to use L...
(more)
13 days ago
Edit Post #289649 Initial revision 13 days ago
Answer A: How do I find files?
The ancient utility `find` should come installed on the majority of distributions. Technically, `find` recursively locates all files and directories under a path, and prints their full paths. It is of course possible to pipe it to other tools like `grep` (actually, `ls` can also list recursively, whi...
(more)
13 days ago
Edit Post #289648 Initial revision 13 days ago
Question How do I find files?
How can I search for files on my system? Ideally, I would like to search by various criteria, like date, name, extension, etc.
(more)
13 days ago
Edit Post #289647 Initial revision 13 days ago
Question How do I tweak the start parameters of GUI apps?
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 variables or adding additional parameters? For example, I can of course type `SOMEENVAR=foo gedit --some-arg...
(more)
13 days ago
Comment Post #289646 I don't have time to write a full answer. However, https://wiki.archlinux.org/title/HiDPI explains most of it. There are multiple graphics frameworks (GTK, Qt, etc) that each have their own separate configuration. Xorg itself also has global DPI settings which the graphics frameworks may or may no...
(more)
13 days ago
Edit Post #289646 Initial revision 13 days ago
Question How do I globally configure consistent DPI for GUI apps?
How do I configure my system so that all GUI apps use a consistent DPI, without configuring each app individually?
(more)
13 days ago
Edit Post #289645 Initial revision 13 days ago
Question How to fix DPI for Spotify
Spotify runs on my computer with higher DPI (bigger UI elements) than I'd like. How can I reduce it?
(more)
13 days ago
Comment Post #289619 A different IP.
(more)
13 days ago
Edit Post #289618 Post edited:
15 days ago
Edit Post #289620 Initial revision 15 days ago
Answer A: How to get a new IP address from DHCP?
Restarting NetworkManager should be enough: `sudo systemctl restart NetworkManger`
(more)
15 days ago
Edit Post #289619 Initial revision 15 days ago
Question How to get a new IP address from DHCP?
How do I make my computer request a new IP from DHCP? I am using Arch with NetworkManager.
(more)
15 days ago
Edit Post #289616 Post edited:
15 days ago
Edit Post #289618 Initial revision 15 days ago
Answer A: How do you terminate a DHCP lease in OpenWrt?
There is not a way to do this from the Web UI (LuCI). Instead: SSH into the router Delete the corresponding line from `/tmp/dhcp.leases` However, note that this is not enough to get a new IP. Clients tend to request a renewal of the IP they had before, and the router will grant it if it does...
(more)
15 days ago
Edit Post #289617 Initial revision 15 days ago
Question How do you terminate a DHCP lease in OpenWrt?
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?
(more)
15 days ago
Edit Post #289616 Initial revision 15 days ago
Answer A: Static IP on wired LAN
I did this with NetworkManager. `nmtui` to open the TUI interface and then select "Edit..." and the ethernet connection You can also use the equivalent GUI or CLI commands, but I find them harder to use Next to `IPv4 Configuration`, click `Show` to see connection details. Go to `Address...
(more)
15 days ago
Edit Post #289615 Initial revision 15 days ago
Question Dnsmasq vs. dnscrypt-proxy
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 block an ad domain) via its `dnsmasq.conf` file Dnscrypt-proxy also runs on the same machine, and dnsma...
(more)
15 days ago
Comment Post #289544 Trial and error it is then. :)
(more)
24 days ago
Comment Post #289541 >"bookmarked folders" would seem to be an OS-level (or at least window-manager-level) feature Why?
(more)
24 days ago
Comment Post #289544 Do you know if there is official documentation on the syntax of this file?
(more)
24 days ago
Edit Post #289541 Initial revision 24 days ago
Question Where does GtkFileChooserDialog store bookmarks?
I have some bookmarked folders in GtkFileChooserDialog. I want to add these to my dotfiles. Where are the bookmarks stored?
(more)
24 days ago
Edit Post #289510 Initial revision 30 days ago
Question Run a command *later*
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 something like `runlater 10min somecmd` and `somecmd` runs 10 min later. I don't want to do `sleep...
(more)
30 days ago
Comment Post #289492 Exactly what I was hoping for! Magic, indeed.
(more)
about 1 month ago
Comment Post #289489 Ripgrep for example has a great way of handling cases. If query is all lower case, it does case insensitive. If it has upper case chars, it is case sensitive. You can also force case sensitive with a switch.
(more)
about 1 month ago
Comment Post #289489 Case sensitive search is annoying, no fuzzy search, a lot of complex hotkeys that are hard to remember...
(more)
about 1 month ago
Edit Post #289490 Initial revision about 1 month ago
Answer A: Ergonomic way to search man pages
Not a real answer, but these days there are some nice LLM models and they're good at summarizing text. If you have the CLI scripts to interact with them, you can submit the man page as the "system prompt" (in ChatGPT parlance) and ask the question in the "user prompt". This will be somewhat slow a...
(more)
about 1 month ago
Edit Post #289489 Post edited:
about 1 month ago
Edit Post #289489 Initial revision about 1 month ago
Question Ergonomic way to search man pages
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 way to handle indices or sections. A great example is `man rsync`. I am often in a situation where ...
(more)
about 1 month ago
Edit Post #289487 Initial revision about 1 month ago
Question Highlight regions in an image with CLI
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 a script, a new image should be applied with the polygons highlighted. I am going to be making a lot o...
(more)
about 1 month ago
Edit Post #289466 Post edited:
about 1 month ago
Edit Post #289466 Initial revision about 1 month ago
Answer A: Internet connection and touchpad not working on Ubuntu 22.04 after a force shut down
This won't be an exact answer. I think with the way it's described, there could be many reasons why the issue manifests. However, the good news is that the live ISO works, therefore the problem is NOT a bug in the Linux kernel or Ubuntu OS. I think that if you did a fresh install of Ubuntu, your h...
(more)
about 1 month ago
Edit Post #289463 Post edited:
about 1 month ago
Edit Post #289463 Initial revision about 1 month ago
Question Do I have to update Guix frequently like Arch?
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 experience, what happens when you try to partially update package `X`, it turns out it now depends on packa...
(more)
about 1 month ago
Edit Post #289462 Initial revision about 1 month ago
Question Do you still need to update archlinux-keyring before pacman -Syu?
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 you update `archlinux-keyring` When you do a full system update, some new packages are signed with ...
(more)
about 1 month ago
Edit Post #289454 Initial revision about 1 month ago
Question Low impact trial installation of Guix to test hardware compatibility
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 regrettably need the non-free drivers). So I don't want to resize and move my partitions around, install Guix, o...
(more)
about 1 month ago
Comment Post #289380 It seems like "encryption" doesn't really answer my question in that case.
(more)
about 1 month ago
Edit Post #289441 Initial revision about 1 month ago
Question Static IP on wired LAN
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`. Ideally, I would like to do this through configuration on the machine only, without configuring an...
(more)
about 1 month ago
Comment Post #289432 Since it works on Windows, it must not be a hardware issue. Next step would be, is it your config or Ubuntu itself. To settle that, what happens with an Ubuntu LiveCD?
(more)
about 1 month ago
Comment Post #289380 What I'm saying is, the logic in this answer appears to be: > Encrypt the SSD, and then it doesn't matter if people can recover the data because they wouldn't be able to decrypt it However, the flaw in this logic appears to be: > If your encryption key happens to leak, you can no longer cons...
(more)
about 1 month ago
Comment Post #289401 There is no such command. ``` $ systemctl start-follow Unknown command verb start-follow. ```
(more)
about 1 month ago
Edit Post #289425 Initial revision about 1 month ago
Answer A: How do I make media keys work with PipeWire?
I was able to make this work with: ``` bindsym XF86AudioRaiseVolume exec --no-startup-id wpctl set-volume -l 1 @DEFAULTAUDIOSINK@ 5%+ bindsym XF86AudioLowerVolume exec --no-startup-id wpctl set-volume @DEFAULTAUDIOSINK@ 5%- bindsym XF86AudioMute exec --no-startup-id wpctl set-mute @DEFAULTAUDIO...
(more)
about 1 month ago
Edit Post #289385 Initial revision about 1 month ago
Answer A: How do you eval SSH agent output in fish?
There are three options. I will list them from least practical to most, because I don't want people to stop reading halfway through :) Parse ssh-agent output with your custom script and re-print it in fish syntax. Always straightforward, but technically makes too many assumptions about the exact ...
(more)
about 1 month ago
Edit Post #289384 Initial revision about 1 month ago
Question How do you eval SSH agent output in fish?
SSH agent prints some envar commands for sourcing in a shell. However, these are bash-style, and I use fish. Fish barfs at the bash syntax. How can I fix it?
(more)
about 1 month ago
Edit Post #289383 Initial revision about 1 month ago
Answer A: SSH key added to agent, but keeps asking for password
After some digging, I was able to figure out the problem. I actually have multiple keys. In Kwallet, I noticed that one of them has the wrong passphrase. So looks like I put the passphrase of Key X for both keys X and Y, and now Y is failing (because that's the wrong passphrase). It looks like Kwalle...
(more)
about 1 month ago
Edit Post #289382 Initial revision about 1 month ago
Question SSH key added to agent, but keeps asking for password
I have my key added to `ssh-agent` and they show up in `ssh-add -l`. When I try to actually SSH to a host that requires the key, I still get prompted for a password. I enter it again and again and it seemingly refuses to cache it. Frustratingly, this configuration is copied between several compute...
(more)
about 1 month ago
Comment Post #289380 Of course, you would still have the secure erase problem if you leaked the key, because you can no longer consider the cryptodisk secure. I get that there is variation between hardware implementations. For that matter, same could be said for magnetic HDDs. But at the end of the day, I doubt all th...
(more)
about 1 month ago
Edit Post #289378 Post edited:
about 1 month ago
Edit Post #289378 Initial revision about 1 month ago
Question How to securely erase data from a thumb (solid state) drive
How do you securely erase data from a thumb (USB/flash) drive? With traditional (magnetic/spinny) hard drives, it used to be that you could use various tools to simply overwrite with random data, and make it unrecoverable. You even have tools like `shred` that can do it for a specific file. Man...
(more)
about 1 month ago
Edit Post #289354 Post edited:
about 1 month ago
Comment Post #289354 Let me edit the answer. I figured the cache would be easy to figure out from what I posted, but sounds like it's not.
(more)
about 1 month ago
Comment Post #289354 Honestly, I've ran into such issues with it as well. It seems like `xdg-open` is supposed to be the final word, but sometimes isn't. I despise this tool for that reason, but we seem stuck with it. The file associations are actually cached, and I think after changing one you also have to reload the...
(more)
about 1 month ago
Edit Post #289370 Initial revision about 1 month ago
Question What does Gnome Disks "erase" do?
When formatting drives with Gnome Disks, there is an option to "Erase". The help text says this takes longer, but "completely" erases data. What exactly does this option do? Is there a CLI equivalent to it?
(more)
about 1 month ago
Edit Post #289354 Initial revision about 1 month ago
Answer A: How to change the default app for opening directories in Gnome?
I don't use Gnome, but I'm guessing it relies on `xdg-open` to figure out what program to use. Your first step would be to do `xdg-open ` to see if it uses the same incorrect program. If so, great - you can troubleshoot xdg-open. If not, Gnome decided to write their own file association resolver t...
(more)
about 1 month ago
Edit Post #289302 Initial revision about 1 month ago
Question How to let systemd user unit see keys in SSH agent?
I have a script that does `git fetch` for a repository. When I run this in my shell it works fine. I want to run it in a systemd user unit. However, I am using an SSH url, and the systemd unit fails with `fatal: Could not read from remote repository.'` (Git exit code 128). This is probably beca...
(more)
about 1 month ago
Edit Post #289301 Initial revision about 1 month ago
Question Starts systemd service and follow log
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 immediately be dropped into the live log from it, similar to `docker run` for example. How can I do ...
(more)
about 1 month ago
Comment Post #289300 And furthermore, systemd should be destroyed. :)
(more)
about 1 month ago
Edit Post #289300 Initial revision about 1 month ago
Question How to create systemd unit that depends on a website being up?
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=Confirm that example is up Wants=network-online.target After=network-online.target nss-lookup.targe...
(more)
about 1 month ago
Edit Post #289227 Initial revision about 2 months ago
Question GUI apps stop working until next boot after some system upgrades
My system occasionally has an issue that looks like this: I run `pacman -Syu` Many things get updated Many GUI apps (including all display managers and Xorg) start refusing to run and throw up OpenGL errors, if I try to restart the display manager I get stuck in TTY with no GUI At next rebo...
(more)
about 2 months ago
Edit Post #289201 Initial revision about 2 months ago
Question What does the "Valid" column mean in the output of "faillock"?
I was looking into unlocking my login after too many incorrect password attempts. I found this post about it. Doing `faillock -user $(whoami) --reset` did indeed unlock the login. However, what exactly is the output of `faillock` and how do I interpret it? When I ran it while I was locked out, ...
(more)
about 2 months ago
Edit Post #289105 Post edited:
The answer is very different for not-gnome
about 2 months ago
Edit Post #289140 Initial revision about 2 months ago
Question How to change keyboard layout without a DE?
I am running X on Arch Linux without a desktop environment, only i3. Sometimes I need to switch between typing in different languages. How do I switch my keyboard layout?
(more)
about 2 months ago
Suggested Edit Post #289105 Suggested edit:
The answer is very different for not-gnome
(more)
helpful about 2 months ago
Edit Post #289138 Initial revision about 2 months ago
Answer A: How can I change the timeout after too many incorrect login attempts?
This appears to be set by the option `unlocktime` in `/etc/security/faillock.conf`.
(more)
about 2 months ago
Edit Post #289137 Initial revision about 2 months ago
Answer A: Increase incorrect login attempts before locking account
This appears to be set by the option `deny` in `/etc/security/faillock.conf`.
(more)
about 2 months ago
Edit Post #289136 Initial revision about 2 months ago
Question How can I change the timeout after too many incorrect login attempts?
When I enter the login password incorrectly 3 times, my computer locks me out from attempting a login for 10 minutes. How can I change the timeout?
(more)
about 2 months ago
Edit Post #289135 Initial revision about 2 months ago
Question Increase incorrect login attempts before locking account
When I enter the login password incorrectly 3 times, my computer locks me out from attempting a login for 10 minutes. How can I increase the number of attempts?
(more)
about 2 months ago
Edit Post #289037 Post edited:
2 months ago
Edit Post #289037 Post edited:
2 months ago
Edit Post #289037 Initial revision 2 months ago
Question How do I set up my own DNS on my LAN, with delegation of public domains?
I want to have a local DNS server on my home LAN, say at `192.168.1.123`. All of my machines will use `192.168.1.123` as their only DNS server when connected to my home network. By default, my DNS server will process requests by checking them with a public DNS service on the internet. I am plannin...
(more)
2 months ago
Edit Post #289026 Post edited:
2 months ago
Edit Post #289026 Initial revision 2 months ago
Answer A: Copy to clipboard from terminal with Vim bindings
Vim has multiple "registers", which in modern parlance is multiple internal clipboards. By default, `y`ank sends to an anonymous register, which is separate from the clipboard. However, you can make it send to other registers. The registers `` and `+` in particular are interesting, because they ha...
(more)
2 months ago
Edit Post #289025 Initial revision 2 months ago
Answer A: Copy to clipboard from terminal with Vim bindings
I use kitty as my terminal, which allows you to map a key for copying any text from the screen to the keyboard. The text is selected by pressing some hint keys, similar to the Vimium extension. It's quite flexible but I mostly use "copy line" and "copy word". This just works with clipboard manager...
(more)
2 months ago
Comment Post #288934 I consider them whitespace.
(more)
2 months ago
Comment Post #288970 @#63646 Evidently, Docker Desktop (which is probably what you would use on windows) supports both: https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-containers Either should work. You should skim the instructions for both and see which one is easier. I don't have much experience with Doc...
(more)
2 months ago
Edit Post #288970 Initial revision 2 months ago
Answer A: How to start MariaDB (or MySQL) server on a WSL using systemctl?
`systemctl` is a tool for controlling systemd, the "new" Linux init system (actually it's been widely used for 10 years now). Systemd is the first process that runs at boot, which then brings up all the rest of the OS. It also handles various background processes like system services. WSL does not...
(more)
2 months ago
Comment Post #288962 It's https://github.com/sharkdp/bat. I assume people would search for something like `bat linux` :) Yes, the Python code can be improved. But I'm wondering if someone has already written such a program, which is in wide circulation, before I go off maintaining my own.
(more)
2 months ago
Edit Post #288962 Initial revision 2 months ago
Answer A: Simplest way of stripping leading/trailing whitespace from file or program output
I'll post this as an example of what I'm looking to do. The following script: ```python import sys a = sys.stdin.read() b = a.strip() c = map(lambda s: s.strip(), b.splitlines()) for s in c: print(s) ``` Will remove: Whitespace at the beginning and end of the file or stream ...
(more)
2 months ago
Edit Post #288934 Post edited:
2 months ago
Edit Post #288934 Post edited:
2 months ago
Edit Post #288934 Initial revision 2 months ago
Question Simplest way of stripping leading/trailing whitespace from file or program output
What is the simplest shell idiom for stripping leading and trailing whitespace from a file or program output? Ideally I am looking for the equivalent of `trim` or `strip` methods in some languages. The ideal solution should skip empty lines at the beginning and end of the file/stream provide a...
(more)
2 months ago
Edit Post #288933 Post edited:
2 months ago
Edit Post #288933 Post edited:
2 months ago
Edit Post #288933 Initial revision 2 months ago
Answer A: What unexpected things can happen if a user runs commands expecting a text file on input lacking a file-final newline?
I tried to think of some for a while, but couldn't find any good ones. That said, there's plenty of programs I don't know. For reference: ``` $ echo -en "hello\nworld" | tee 1.txt | bat -A ───────┬───────────────────────────────────────── │ STDIN │ Size: - ───────┼──────────────...
(more)
2 months ago
Comment Post #288915 >some commenters argued that the original short version was unanswerable because you'd have to check every implementation of every Unix/Linux command 🙄 It sounds like your question would be satisfied with just some general rules of thumb + a few illustrative real world examples, and you're not ...
(more)
2 months ago
Comment Post #288915 As a programmer and Unix philosophy adherent, I write many programs, many of them taking textual input on the terminal. I would die of shame if someone ever found a bug in my programs where they break just because of a terminal newline. It would be like taking an IQ test and getting a double digit sc...
(more)
3 months ago
Comment Post #288915 This reads a bit like a rant disguised as a question. Superficially, you're asking what problems can happen if you omit the terminal newlines, but really you spend a lot of time explaining how the answer is "nothing, that rule is dumb" (which I agree with, btw). It doesn't really read like a genuine ...
(more)
3 months ago
Comment Post #288915 Uh, wait, how does being closed on SX cause it to be verbose? Is it because they nagged the original asker into adding a lot of detail? I think the whole point of this site is that the moderation policy is different than SX, so it might be better to ask the question the way it should have been asked ...
(more)
3 months ago
Comment Post #288913 It seems like `pamixer --sink 123 -i 10` works. In my case, looks like the device which gets used as a default sink is not the one I have connected. So the problem with this command is to figure out which sink should be used.
(more)
3 months ago
Edit Post #288913 Initial revision 3 months ago
Question How do I make media keys work with PipeWire?
My keyboard has keys for mute, volume up, volume down. In i3wm, I used to have these bound with: ``` bindsym XF86AudioRaiseVolume exec --no-startup-id pulsemixer --change-volume +10 --max-volume 100 bindsym XF86AudioLowerVolume exec --no-startup-id pulsemixer --change-volume -10 --max-volume 100 ...
(more)
3 months ago
Edit Post #288912 Initial revision 3 months ago
Question PipeWire separates the audio of every program, how do I combine them?
I uninstalled PulseAudio and installed PipeWire. It seems like now, every application gets an independent audio configuration. When I go into pavucontrol I see "Spotify" where I configure the volume and output device that Spotify sends sound to. But if I also open a Youtube video in my browser, th...
(more)
3 months ago
Edit Post #288911 Initial revision 3 months ago
Question Is PipeWire easier to use than PulseAudio?
I have always found PulseAudio to be difficult to use and overcomplicated. Recently I also discovered that it is written by Lennart Poettering, whom I dislike. I am now very motivated to use something else. But configuring sound is also not my passion, I just want sound to work on my computer as I pl...
(more)
3 months ago
Edit Post #288908 Initial revision 3 months ago
Answer A: How to install mysql-server on Debian?
MySQL is not fully open source and maintained by a corporation which was at one time regarded as very evil (there are much worse ones now). Debian is trying to protect you from yourself by not letting you install it. MariaDB is a project developed from forked MySQL code, and designed to be a drop ...
(more)
3 months ago
Comment Post #288849 There shouldn't be any future problem. MariaDB was specifically designed to be a drop in replacement for MySQL, in exactly this type of situation.
(more)
3 months ago
Comment Post #288309 >break down any one liners into their constituent parts, explaining each of them This is what I tend to do as well, and yes it is laborious. Instead I suggest that *just breaking down the steps* and linking to the question explaining each step should be considered a sufficient answer. And if the q...
(more)
3 months ago
Comment Post #288562 @#53919 You are right that part of the question stems from a confusion over what's due to missing shell escapes, what's due to missing regex escapes, and what's because of whatever flavor of regex is being used for the sed invocation. Naturally, an answer should address this point as well. To clar...
(more)
3 months ago
Comment Post #288562 That syntax would actually solve my problem, except that I couldn't get it to work. `b+` is a valid regex meaning "1 or more `b`'s" and the `s/b+/X/` should instruct `sed` to replace each occurence of `b+` with `X`. My input `abc` should therefore be transformed to `aXc`. But I get: ``` $ echo a...
(more)
3 months ago
Comment Post #288544 Hmm. I assumed there was just a single obvious program that is the culprit. This was a big pacman update, so it's hard to say exactly why it was. I can keep an eye on it in future updates. What exactly would I do with `rmmod`/`modprobe`? Are there any useful keywords to look for in the pacman log?
(more)
3 months ago
Comment Post #288554 Well, between say 1000 small updates that each have 0.1% chance of breakage, and 1 big update that has a 10% chance to break, there's not a huge difference. Both ways break rarely on Arch anyhow. Normally, whenever I get on my computer, I have several things which are vastly more interesting to do...
(more)
3 months ago
Comment Post #288554 Thanks! I think it's probably better to use `pacman -Sywu` - might as well refresh the repos if we're trying to pull in latest updates. I did test this and it works.
(more)
3 months ago
Edit Post #288544 Initial revision 3 months ago
Question After update, OpenGL does not work until reboot
Whenever I do a big system update, OpenGL stops working until the next reboot. This also prevent OpenGL apps from launching. Example: ``` $ glxgears X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 151 (GLX) Minor opcode ...
(more)
3 months ago
Edit Post #288543 Initial revision 3 months ago
Question Download packages for full system upgrade without installing
I noticed that downloading all the pacman packages for a full system install takes a lot of time, so I want to create a systemd time that will periodically download them for me. That way, most of the time the cache will be fresh, and when I actually do update them, most will not need to be re-downloa...
(more)
3 months ago
Edit Post #288542 Initial revision 3 months ago
Answer A: How to debug NetworkManager issue after suspend/resume in Ubuntu 22.04
Although you have left a post saying it is solved, I think it's not uncommon for this kind of problem to show up. I think it can happen due to misconfiguration of either NM or the network drivers/hardware. It would be more useful to have a general troubleshooting question for dealing with NM timeouts...
(more)
3 months ago
Comment Post #288541 I decided to create the tag `quotes` for this, to represent question to do with escaping strings in shells. I think it's a more direct and obvious term than `escaping` for example. Anyhow, I'd love to add a description to the tag, but I couldn't figure out how to do it.
(more)
3 months ago
Edit Post #288541 Initial revision 3 months ago
Question Can I enter raw strings in fish to avoid escaping regexes for sed?
When running `sed` through `fish`, I often encounter a problem with regexes. Many commonly used regex control characters like `[]{}().+` need to be escaped, even if I type the regex in a single quoted string. For example: ``` $ echo abc | sed 's/b+/X/' abc $ echo abc | sed 's/b\+/X/' aXc ``...
(more)
3 months ago
Comment Post #288318 That's a good idea - I'll give it a try next time I run into this. With `bwrap`, it is indeed possible to capture diagnostics both inside and outside. Outside will include the activity of bwrap itself on top of what the program inside does. Both might be interesting in this case.
(more)
3 months ago
Comment Post #288318 @#58118 Interesting - I'm not sure if that's true, but it would certainly explain it if so. Any idea on how I can confirm it?
(more)
3 months ago
Comment Post #288436 Usually "number of cores" is a good starting value for `n`.
(more)
3 months ago
Edit Post #288316 Post edited:
3 months ago
Comment Post #288332 I know you said you want to avoid a reinstall, but actually it wouldn't be too hard to do. You would: 1. Backup the `/home` somewhere (easier if `/home` is its own partition) 2. Get list of all explicitly installed packages from apt 3. Wipe everything else 4. Install fresh Debian with same user...
(more)
3 months ago
Comment Post #288332 It's been a while since I used Debian, but what if you simply: * Ask `apt` to export a list of packages that came from unstable (you want to make sure that you ask for those explicitly requested, and not just dependencies) * Uninstall them all (and their dependencies) * Remove `unstable` from `/...
(more)
3 months ago
Edit Post #288311 Post edited:
3 months ago
Edit Post #288401 Post edited:
3 months ago
Edit Post #288401 Initial revision 3 months ago
Question Are there any legitimate uses for newlines in filenames?
Unix is very permissive with filenames, and this can sometimes lead to a bunch of annoying corner cases when printing files. A well known example is when you put a newline in a filename, and it breaks naive parsing of a file list later in the pipeline. There's not much mystery around why Unix deci...
(more)
3 months ago
Edit Post #288311 Post edited:
3 months ago
Comment Post #288311 Does `find` also have that problem? I thought that was a concern just for `ls`.
(more)
3 months ago
Comment Post #288334 Fontbase looks really nice! I see that it is freeware, but I think it's not open source, right?
(more)
3 months ago
Comment Post #288329 NB: I'm not marking "works for me" to encourage other folks to post better answers (if they want). For example, I've only addressed Bash, which is honestly a pretty bad choice of shell in this day and age. Also, it technically doesn't work for me, because I use fish. :) I have no idea what the syn...
(more)
3 months ago
Edit Post #287901 Post edited:
Add tags
3 months ago
Comment Post #287333 There are ways to add it to the PATH, but is this really what you want? The way you installed Python is unusual. Normally people install it from a package manager, which will create a symlink in `/usr/bin/` which is already in `PATH`. If your distro has old Python, you can try something like pyenv.
(more)
3 months ago
Edit Post #288318 Post edited:
3 months ago
Edit Post #288323 Post edited:
3 months ago
Edit Post #288329 Initial revision 3 months ago
Answer A: When a command takes filenames as argument, how can I avoid creating temporary files?
What you're looking for is called process substitution. In Bash and many bash-like shells, you can use `<(foocommand --with --arguments)` instead of the file path: ``` diff <(ls /home/alice) <(ls /home/bob) ```
(more)
3 months ago
Edit Post #288328 Initial revision 3 months ago
Question When a command takes filenames as argument, how can I avoid creating temporary files?
Suppose I have a command that takes filenames as arguments, like: `diff foo.txt bar.txt` What if instead of actual files, I want to use the results of a command in each? I can use temporary files: ``` ls /home/alice > /tmp/alice.txt ls /home/bob > /tmp/bob.txt diff alice.txt bob.txt ``` ...
(more)
3 months ago
Edit Post #288324 Initial revision 3 months ago
Answer A: How do I use Proton without Steam?
This can be done with Wine Bottles. 1. Install flatpak from your package manager. 2. Install Bottles from Flatpak (may show up as `Discover (Software Center)`) May take a while, because it has many dependencies and flatpak does not support parallel downloads 3. Run Bottles. You may need to...
(more)
3 months ago
Comment Post #288323 There's instructions for this floating around the net where you rip the proton files out of Steam's own dir and then run the binary directly. You can even "acquire" the files with an empty Steam account by downloading a free game. However they're all on weird forums that are a total mess to read, and...
(more)
3 months ago
Edit Post #288323 Initial revision 3 months ago
Question How do I use Proton without Steam?
I can easily run Windows games with wine by running: ``` wine game.exe ``` However, if I want to use Proton I have to run Steam, add the game as a non-Steam game, and run it that way. Since Proton is just a modified Wine runtime, is there a way to use a game with Proton without involving S...
(more)
3 months ago
Edit Post #288322 Initial revision 3 months ago
Question Why is there a mono version of Inconsolata?
After installing the InconsolataGo font from the Arch package `extra/ttf-inconsolata-go-nerd`, I see there is an `Inconsolata Nerd Font, Regular` and an `Inconsolata Nerd Font Mono, Regular`. Both are monospace. This seems common with fonts that are intended as fixed width. Why is there two identi...
(more)
3 months ago
Comment Post #288320 This works! I'm still interested in better options than the Gnome app - in particular better interface.
(more)
3 months ago
Edit Post #288318 Initial revision 3 months ago
Question Why do many Windows games fail when the network is sandboxed?
I run Windows games with Wine, and use `bwrap` to sandbox them. I've noticed that passing `--unshare-net` to disable the network breaks many, many games (they fail to start with no obvious error message). However, at the same time, if I do `nmcli networking off` instead of `--unshare-net` the game la...
(more)
3 months ago
Edit Post #288317 Initial revision 3 months ago
Question How do you troubleshoot bwrap/wine sandboxes for Windows games?
I use Wine to play Windows games. As is well known: Wine is not a sandbox Windows games are proprietary blobs and can contain malware Windows malware can potentially harm Linux through Wine I don't want malware having free reign on my Linux machine so I sandbox it with bwrap. For the less-...
(more)
3 months ago
Edit Post #288316 Initial revision 3 months ago
Answer A: When should you install windows dlls for wine with winetricks?
Windows packages all of its API functions into DLLs, so when you have a program that relies on calls to X, Y and Z you must ensure that you have the correct set of DLLs that provide all of those. The exact organization of which X, Y and Z goes into which DLL is complicated and depends on: Three d...
(more)
3 months ago
Edit Post #288314 Post edited:
3 months ago
Edit Post #288314 Initial revision 3 months ago
Answer A: Recursively remove files with the same name as the ones that end in `.part`
For each file named `foo.xyz`, you want to delete `foo.xyz.part`. It doesn't matter if `foo.xyz.part` exists, you can just attempt it and skip errors. You can get a list of all files with `find` etc. But you don't want the ones with `.part`, so you use grep to take them out: `find | grep -v '\.par...
(more)
3 months ago
Comment Post #287901 This is a long and complex function and I don't think it makes sense to expect people to debug the whole thing. * Does your `cd` function even work when shadowing the builtin `cd`? Rename it to `mycd` and make it just do `cd /tmp/`. * Does your fzf command actually return the directory you need? ...
(more)
3 months ago
Comment Post #287901 Which shell is this?
(more)
3 months ago
Suggested Edit Post #287901 Suggested edit:
Add tags
(more)
helpful 3 months ago
Edit Post #288313 Initial revision 3 months ago
Answer A: How to get number of files in directory
The obvious way to do it is: 1. Find some way to get a list of the files 2. Pipe it into `wc` to count Classically, this would be `find /path/to/dir | wc`. However `fd` does the same thing with better usability. By default, `fd` will skip "hidden" files and directories (like `.foo`) and will i...
(more)
3 months ago
Edit Post #288311 Post edited:
3 months ago
Edit Post #288312 Post edited:
3 months ago
Edit Post #288312 Initial revision 3 months ago
Answer A: How to convert Flac to Mp3 with FFmpeg?
I see that this is self-answered, but I disagree that the answer provided is the best way. The best way is to properly utilize the Unix philosophy, by decomposing the problem into simpler sub-problems. It is probably not hard to figure out how to convert a single file `foo.flac` into `foo.mp3`. I'...
(more)
3 months ago
Edit Post #288311 Initial revision 3 months ago
Answer A: How to run a command on a list of files?
There are several options, like `xargs` and `for`. I'll leave those for other answers and only describe my favorite, GNU Parallel. You will have to install it separately, because unlike the inferior `xargs` it usually does not come pre-installed. Parallel can take a list of files on STDIN and run ...
(more)
3 months ago
Edit Post #288310 Initial revision 3 months ago
Question How to run a command on a list of files?
Suppose I have a list of files on standard input. These may be the output of `find`, `cat filelist.txt` or something else. How can I run a command on each file in turn?
(more)
3 months ago
Edit Post #288309 Initial revision 3 months ago
Question Decomposing compound questions
The basis of the Unix philosophy is to decompose complex tasks into simple sub-tasks, so that one can easily choose a combination of simple Unix tools to solve the problem in an intuitive way. Often I see newbies ask questions along the lines of "how do I X complicated and specific thing". The gre...
(more)
3 months ago
Edit Post #288306 Initial revision 3 months ago
Question How do I view fonts?
How can I view font files, like `.ttf`, in Linux? I'd like to see a sample of the font (quick brown fox...) and metadata about it (like exact name).
(more)
3 months ago
Comment Post #288259 Thanks for the response @#8046 ! I do like the idea of doing away with the accepted answers - but the only thing is, how will people find questions that need improvement? I wasn't aware of: >We did recently add filters for the category list; "unanswered" means no answers with positive score, as op...
(more)
3 months ago
Edit Post #288259 Initial revision 3 months ago
Answer A: How can we grow this community?
Don't answer too many questions Avoid major tag gaps Keep the front page lively. My armchair analysis is that the funnel for this site is like this: 1. User gets linked from internet search or elsewhere Non-early adopters drop here because they don't want to bother clicking on some u...
(more)
3 months ago