89luca89 / distrobox

Use any linux distribution inside your terminal. Enable both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with. Mirror available at: https://gitlab.com/89luca89/distrobox
https://distrobox.it/
GNU General Public License v3.0
9.41k stars 384 forks source link

[Bug] XDG_ env variables still not being set when created with --home #1429

Open BvngeeCord opened 1 month ago

BvngeeCord commented 1 month ago

The problem I'm having is the exact same as in #420: With a --home set during distrobox-create, XDG_CONFIG_HOME and related env variables are still relative to the host's home dir. I see a fix was implemented here in this commit, and I've manually double checked that that code snippet is present in my version of distrobox, but for whatever reason the issue persists. I have no idea why.

  1. first I ran distrobox create -i docker.io/library/debian:stable-backports -n Debian --hostname debian --home ~/distrobox/debian-home --nvidia
  2. distrobox enter Debian
  3. debian% echo $HOME
    /home/<user>/distrobox/debian-home
    debian% echo $XDG_CONFIG_HOME
    /home/<user>/.config

Expected behavior

debian% echo $HOME
/home/<user>/distrobox/debian-home
debian% echo $XDG_CONFIG_HOME
/home/<user>/distrobox/debian-home/.config

Logs podman logs --latest: podman_latest.txt

Desktop:

89luca89 commented 2 weeks ago

This works for me:

image

Can you try with latest git version?

BvngeeCord commented 1 week ago

This works for me: ... Can you try with latest git version?

Yup, I just cloned the distrobox repo from git and ran the exact same command that you did:

image

89luca89 commented 1 week ago

@BvngeeCord thanks for trying!

Strange, it seems probably there is something in either your profile or dotfiles setting them?

Can you try with distrobox enter --dry-run and see if the env is set correctly?

image

BvngeeCord commented 5 days ago

@BvngeeCord thanks for trying!

Strange, it seems probably there is something in either your profile or dotfiles setting them?

Can you try with distrobox enter --dry-run and see if the env is set correctly?

Yup! This is interesting.. image