Giter Site home page Giter Site logo

Comments (2)

tymonx avatar tymonx commented on May 30, 2024

It seems that distrobox enter adds --env XAUTHORITY=${XAUTHORITY} anyway in that generic for-loop: https://github.com/89luca89/distrobox/blob/1.7.2.1/distrobox-enter#L443

But still it is not present when doing:

env | grep XAUTHORITY

But if I run created container by distrobox create using podman exec:

podman exec --interactive --tty --detach-keys="" --user=root --workdir="${HOME}" --env XAUTHORITY <container> su "${USER}" --pty

Then the XAUTHORITY environment variable is not empty. I'm trying to narrow the issue here. Above command is also ran by distrobox enter. After podman exec and before <container> the distrobox enter adds bunch of additionals --env. Something is causing that the XAUTHORITY environment variable is unset after switching from root to user.

from distrobox.

tymonx avatar tymonx commented on May 30, 2024

Short story. When --env DISPLAY=:0 is present, it will clear XAUTHORITY. I have been using custom AlmaLinux OS 9.3 with added user etc.. Somehow when calling su "${USER}" --pty when switching from root to user by distrobox enter, it clears XAUTHORITY environment variable. With vanilla AlmaLinux OS 9.3 it doesn't happen.

Not working host-spawn in distrobox-init is OK/not relavant for me because it should be fixed by distrobox-enter and --env XAUTHORITY from this loop https://github.com/89luca89/distrobox/blob/1.7.2.1/distrobox-enter#L443

I will try to narrow problem in my custom container image based on AlmaLinux OS 9.3 and share minimum Dockerfile to reproduce that.

from distrobox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.