-
Notifications
You must be signed in to change notification settings - Fork 450
Add support to not use the host environment variables #508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I just got into distrobox today, going to use it for LibreOffice bug triaging as bleeding edge distros can't run old versions. I guess implementing this request would allow me to skip having to say |
Anyone know how to add this feature? Because my solution isnt working, because you 100% need it for just some boxes and not for all. |
Closing in favor of #656 |
Currently, all host environment variables are copied into the container, except for a hardcoded few that are ignored: https://github.com/89luca89/distrobox/blob/3b9f0e8d3d8bd102e1636a22afffafe00777d30b/distrobox-enter#L434 This is not always the desired behavior, particularly on host distros like NixOS or Guix that break from the FHS and need to set a lot of environment variables to work around the resulting issues: 89luca89#1516 Therefore, provide a --no-envvars option to disable the default copying of environment variables, and an --additional-envvars option to copy specific ones. It was suggested to use `env -u distrobox` in order to unset specific environment variables: 89luca89#656 However, there are usually too many copied environment variables to unset them all individually. `env -i distrobox` will unset environment variables, but that includes PATH and other things needed for distrobox to execute correctly on the host. Other instances of this feature being requested: 89luca89#508 89luca89#743 89luca89#1173
Uh oh!
There was an error while loading. Please reload this page.
Hi, Im using distrobox for my user space and also for my gamerig (because the host run alpine and I need glib) and I like my games files to be separate from my $HOME, I can change the container $HOME but it is not helping if I have on the host XDG_*_HOME setup. Also Im using distrobox to test apps and build them and its just clutter my home.
It could be solve by adding a env var (for the host) like DBX_HOST_ENV={true,false} and then check it in distrobox-enter.
Im thinking this solution would not work because you need to check that for if I export a program to the host e.g lutris.
The text was updated successfully, but these errors were encountered: