Skip to content
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

Pass XAUTHORITY environment variable to container #572

Merged
merged 1 commit into from
Oct 29, 2020

Conversation

likan999
Copy link
Contributor

@likan999 likan999 commented Oct 3, 2020

On system that uses this instead of ~/.Xauthority, this is need to make sure the container can run X programs.

@softwarefactory-project-zuul
Copy link

Build failed.

Copy link
Member

@debarshiray debarshiray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this. The patch looks good, but the commit message needs some work:

  • Would be better if you used a real email address instead of [email protected]
  • Prefix the subject of the commit with pkg/utils: and mention X11 clients instead of GUI programs
  • Link to this pull request

debarshiray pushed a commit to likan999/ppa-toolbox that referenced this pull request Oct 27, 2020
@softwarefactory-project-zuul
Copy link

Build failed.

@debarshiray
Copy link
Member

I was playing around with this a bit today, and I realized that we need to add the package that provides xauth(1) (ie., the xorg-x11-xauth RPM on Fedora) to our default images for this to work out of the box.

Otherwise, if xauth(1) is missing, then pam_xauth.so won't set the XAUTHORITY environment variable inside a session started by sudo(8).

It's necessary to propagate the XAUTHORITY environment variable from
the host when an X11 client is run as 'sudo <some-client>'. If an X11
client is started inside a 'su -' session, then xauth(1) needs to be
present so that pam_xauth.so can add a new XAUTHORITY environment
variable to the 'su -' session.

containers#572
@debarshiray debarshiray merged commit fca24b2 into containers:master Oct 29, 2020
@likan999
Copy link
Contributor Author

Oops I should've addressed the review comments myself. @debarshiray thanks for improving the PR.

@likan999 likan999 deleted the patch-2 branch October 29, 2020 23:18
likan999 added a commit to likan999/ppa-toolbox that referenced this pull request Oct 30, 2020
It's necessary to propagate the XAUTHORITY environment variable from
the host when an X11 client is run as 'sudo <some-client>'. If an X11
client is started inside a 'su -' session, then xauth(1) needs to be
present so that pam_xauth.so can add a new XAUTHORITY environment
variable to the 'su -' session.

containers#572
@debarshiray
Copy link
Member

Oops I should've addressed the review comments myself. @debarshiray thanks for improving the PR.

My pleasure. Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants