Lurker News

Comments (239) 44 threads

Earlier comments
boomskats1 reply#
Isn't this what your `~/.config` directory is for? Is that where you'd expect it to try first?

Really interesting project for other use cases too btw.

notamy#
It is, but I find many programs ignore ~/.config 3:
notamy1 reply#
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.
stabbles1 reply#
Is there an infinite recursion in /tmp? Do you use a bubblewrap-like pivot_root trick?
notamy#
> Is there an infinite recursion in /tmp?

No! The directory in /tmp outside of the "box" is completely empty; the remount of / is only seen within the mount namespace.

bullfightonmars1 reply#
This is very cool and would massively simplify how I build my dotfiles. Is there any way this could support macOS?
notamy#
> Is there any way this could support macOS?

I don't use macOS often-enough to know for sure, but a quick search suggests that bind-mounts (or similar) are more complicated on macOS. Not against the idea tho!
Edit:
> and would massively simplify how I build my dotfiles.
I guess I should tell r/unixporn at some point, huh? (:

jpeeler1 reply#
Can boxxy make use of rules with regex? If not, consider this a feature request.
notamy1 reply#
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...
jpeeler1 reply#
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!
notamy#
Absolutely a good idea! I'll have to see what's doable.

Load more comments