Live data from Hacker News

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

github.com

71–80 of 250 posts

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

#71
post #68
post #49

Earlier quoted context omitted.

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.

The man page + Google! There's very few good examples of it, and I've accepted that I'm just not familiar enough with that specific problem space.

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

#73
post #65

Earlier quoted context omitted.

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.

I think you mean `~/.cache`.

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

#74
post #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...

Okay understood. Consider adding a way to query all files written by a boxed application. If it generated a config file based on this info that would be super useful. Thanks for considering!

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

#77
post #20

Does this use namespaces or chroot? The readme mentions namespaces (like Flatpak?), but https://github.com/queer/boxxy/blob/mistress/src/enclosure/m... seems to indicate it uses chroot.

It creates a new mount namespace, and bind-mounts your ENTIRE filesystem into it, before chrooting, so that it can optionally remount / as ro to prevent applications from writing outside of the desired directories. The namespace is to allow doing the bind mounts in the first place.

Is there an infinite recursion in /tmp? Do you use a bubblewrap-like pivot_root trick?

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

#79

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? :\

Should've kept Slack in a containered in a browser tab where it belongs so it can't go messing with your system or prevent you from blocking their tracking.

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

#80

I wonder if this could be used to move the obnoxious ~/snap directory.

Question is if those user/mount namespace tricks are composable

As far as I'm aware, yes! You should be able to nest namespaces and mounts.
Post reply on HN