Live data from Hacker News

Show HN: boxxy – Control where Linux programs put files, without symlinks

github.com

61–70 of 250 posts

Re: Show HN: boxxy – Control where Linux programs put files, without symlinks

#61

Hah I was literally just complaining about applications not following the XDG directory spec today. there's a non-exhaustive list of applications on the archwiki [0] that put their config/data in dotfiles in the home directory. surprisingly, there's also lots of pushback from maintainers of projects who don't want to change this, for whatever excuse they can produce. a Reddit thread has some list of issues where the…

Yep, this does my head in. I really feel like there's no excuse for it in 2023.

Re: Show HN: boxxy – Control where Linux programs put files, without symlinks

#62

Hah I was literally just complaining about applications not following the XDG directory spec today. there's a non-exhaustive list of applications on the archwiki [0] that put their config/data in dotfiles in the home directory. surprisingly, there's also lots of pushback from maintainers of projects who don't want to change this, for whatever excuse they can produce. a Reddit thread has some list of issues where the…

Can I also soapbox about the XDG_CONFIG_HOME (~/.config) folder having gigs of temp data in it?

(I'm looking at you, Slack!)

How awesome would it be to be able to back up my custom app configs just by copying around one tiny folder? Or throwing it in a git repo and knowing what config changed when? :\

Re: Show HN: boxxy – Control where Linux programs put files, without symlinks

#63

Maybe I've misunderstood, but it seems like this would only help for files the program puts in places itself. Thus it wouldn't help with files placed by the installer would it?

The package manager already installs the program into the right place.

Re: Show HN: boxxy – Control where Linux programs put files, without symlinks

#65

Hah I was literally just complaining about applications not following the XDG directory spec today. there's a non-exhaustive list of applications on the archwiki [0] that put their config/data in dotfiles in the home directory. surprisingly, there's also lots of pushback from maintainers of projects who don't want to change this, for whatever excuse they can produce. a Reddit thread has some list of issues where the…

Can I also soapbox about the XDG_CONFIG_HOME (~/.config) folder having gigs of temp data in it? (I'm looking at you, Slack !) How awesome would it be to be able to back up my custom app configs just by copying around one tiny folder? Or throwing it in a git repo and knowing what config changed when? :\

    $ du -sch ~/.config/Slack
    846M $HOME/.config/Slack
    846M total
... this is on a two day old machine. WTF, Slack? Junk cached data belongs in ~/.local/share ($XDG_DATA_HOME), not ~/.config.

Re: Show HN: boxxy – Control where Linux programs put files, without symlinks

#66
post #56

It looks like a useful project. By the way, as for the original motivation: > I recently had to use the AWS CLI. It wants to save data in ~/.aws, but I don't want it to just clutter up my $HOME however it wants. boxxy lets me force it to puts its data somewhere nice and proper. - they could have used AWS_CONFIG_FILE and AWS_SHARED_CREDENTIALS_FILE.

But you shouldn't have to — that's the point of the complaint. That's like saying that if your neighbor is dumping toxic waste in your yard, you can always ask them to stop. Sure, but maybe they just shouldn't do that in the first place.

Sure. But there will be many scenarios where you can't use boxxy.

Re: Show HN: boxxy – Control where Linux programs put files, without symlinks

#67
post #30

Earlier quoted context omitted.

In the past I used something like inotab to use an inotify-based trigger to pipe data from SSH to a different system that didn't have any NAS or SAN support, it might also work to detect 'who' is touching any files that boxxy has previously seen rules for. Perhaps still too tricky to make it do magic things and break programs in the process, but it could be used to audit who's working with what paths and let the user…

That is an excellent idea! Something like could definitely be worth adding. It's why there's a "remount rootfs as ro" flag; that way anything not specified in rules is ro and misbehaving programs will explode.

Love exploding apps. That's what they get for eating my filesystem.

Re: Show HN: boxxy – Control where Linux programs put files, without symlinks

#68
post #49
post #28

Earlier quoted context omitted.

Fun fact, one layer of App Engine's sandbox from a couple years ago was implemented using ptrace. It will redirect filesystem IO to in-memory files.

Interesting! That makes perfect sense, I just don't think I'm smart enough to use ptrace properly right now :P

Were you mostly going off the ptrace man page? I tried reading it to figure out ptrace and it made me feel not smart enough too.

Re: Show HN: boxxy – Control where Linux programs put files, without symlinks

#70
post #69

Can boxxy make use of rules with regex? If not, consider this a feature request.

It sadly can't. Regex paths are hard due to the way it's implemented; if it was intercepting syscalls via ptrace then regex would be a lot more viable, but since this is just a glorified collection of bind mounts in the end, I'm unsure how I'd implement that nicely...
Post reply on HN