containers / toolbox

Tool for interactive command line environments on Linux
https://containertoolbx.org/
Apache License 2.0
2.38k stars 208 forks source link

isolate home directory #1470

Closed boredsquirrel closed 3 months ago

boredsquirrel commented 3 months ago

Is your feature request related to a problem? Please describe. Toolbox images, no matter the OS, will use the same home directory as the host OS.

The home dir is writable even on atomic Fedora, and will stay like that forever, especially the XDG directories like ~/.config or ~/.local/share

This is extremely problematic when running the same application but with different versions, as those configs will be distro-dependent and version dependent.

Distrobox has the ability to create a box using a separate home dir, this is not sandboxed but it will simply make all apps save their configs in there, which is crucial.

Describe the solution you'd like Use a separate homedir by default, in ~/.toolbx-home or similar. Sharing a homedir can seriously mess up a user profile.

Also add the ability to define it, but this is optional really.

Describe alternatives you've considered Using Distrobox

debarshiray commented 3 months ago

Duplicate of https://github.com/containers/toolbox/issues/183

debarshiray commented 3 months ago

You can use a mix of /run/.containerenv and /run/.toolboxenv to override the HOME environment variable on your own, no?

Some people want to do this because they don't trust their development environment. That's understandable but a development environment also needs things like private SSH keys. This is one of the reasons it's not that easy to make this work properly.

debarshiray commented 3 months ago

I am going to close this issue so that the list of open issues doesn't balloon out of control, and continues to roughly reflect the items that are on the current to-do list. However, it will still be around for future reference.

debarshiray commented 3 months ago

Thanks for your interest in Toolbx.