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
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)
11 months ago
Edit Post #288541 Initial revision 11 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)
11 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)
11 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)
11 months ago
Comment Post #288436 Usually "number of cores" is a good starting value for `n`.
(more)
11 months ago
Edit Post #288316 Post edited:
11 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)
11 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)
11 months ago
Edit Post #288311 Post edited:
11 months ago
Edit Post #288401 Post edited:
11 months ago
Edit Post #288401 Initial revision 11 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)
11 months ago
Edit Post #288311 Post edited:
11 months ago
Comment Post #288311 Does `find` also have that problem? I thought that was a concern just for `ls`.
(more)
11 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)
11 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)
11 months ago
Edit Post #287901 Post edited:
Add tags
11 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)
11 months ago
Edit Post #288318 Post edited:
11 months ago
Edit Post #288323 Post edited:
11 months ago
Edit Post #288329 Initial revision 11 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)
11 months ago
Edit Post #288328 Initial revision 11 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)
11 months ago
Edit Post #288324 Initial revision 11 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)
11 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)
11 months ago
Edit Post #288323 Initial revision 11 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)
11 months ago
Edit Post #288322 Initial revision 11 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)
11 months ago
Comment Post #288320 This works! I'm still interested in better options than the Gnome app - in particular better interface.
(more)
11 months ago
Edit Post #288318 Initial revision 11 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)
11 months ago
Edit Post #288317 Initial revision 11 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)
11 months ago
Edit Post #288316 Initial revision 11 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)
11 months ago
Edit Post #288314 Post edited:
11 months ago
Edit Post #288314 Initial revision 11 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)
11 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)
11 months ago
Comment Post #287901 Which shell is this?
(more)
11 months ago
Suggested Edit Post #287901 Suggested edit:
Add tags
(more)
helpful 11 months ago
Edit Post #288313 Initial revision 11 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)
11 months ago
Edit Post #288311 Post edited:
11 months ago
Edit Post #288312 Post edited:
11 months ago
Edit Post #288312 Initial revision 11 months ago