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 #288401 Initial revision over 1 year 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)
over 1 year ago
Edit Post #288311 Post edited:
over 1 year ago
Comment Post #288311 Does `find` also have that problem? I thought that was a concern just for `ls`.
(more)
over 1 year ago
Comment Post #288334 Fontbase looks really nice! I see that it is freeware, but I think it's not open source, right?
(more)
over 1 year 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)
over 1 year ago
Edit Post #287901 Post edited:
Add tags
over 1 year 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)
over 1 year ago
Edit Post #288318 Post edited:
over 1 year ago
Edit Post #288323 Post edited:
over 1 year ago
Edit Post #288329 Initial revision over 1 year 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)
over 1 year ago
Edit Post #288328 Initial revision over 1 year 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)
over 1 year ago
Edit Post #288324 Initial revision over 1 year 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)
over 1 year 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)
over 1 year ago
Edit Post #288323 Initial revision over 1 year 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)
over 1 year ago
Edit Post #288322 Initial revision over 1 year 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)
over 1 year ago
Comment Post #288320 This works! I'm still interested in better options than the Gnome app - in particular better interface.
(more)
over 1 year ago
Edit Post #288318 Initial revision over 1 year 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)
over 1 year ago
Edit Post #288317 Initial revision over 1 year 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)
over 1 year ago
Edit Post #288316 Initial revision over 1 year 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)
over 1 year ago
Edit Post #288314 Post edited:
over 1 year ago
Edit Post #288314 Initial revision over 1 year 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)
over 1 year 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)
over 1 year ago
Comment Post #287901 Which shell is this?
(more)
over 1 year ago
Suggested Edit Post #287901 Suggested edit:
Add tags
(more)
helpful over 1 year ago
Edit Post #288313 Initial revision over 1 year 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)
over 1 year ago
Edit Post #288311 Post edited:
over 1 year ago
Edit Post #288312 Post edited:
over 1 year ago
Edit Post #288312 Initial revision over 1 year 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)
over 1 year ago
Edit Post #288311 Initial revision over 1 year 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)
over 1 year ago
Edit Post #288310 Initial revision over 1 year 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)
over 1 year ago
Edit Post #288309 Initial revision over 1 year 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)
over 1 year ago
Edit Post #288306 Initial revision over 1 year 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)
over 1 year 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)
over 1 year ago
Edit Post #288259 Initial revision over 1 year ago