Red Hat Bugzilla – Bug 2132
after su as user root programs can't find user X server
Last modified: 2008-05-01 11:37:49 EDT
After login in as a user under X, and su to root printool,
netcfg etc can find the X server from a terminal.
You must use xauth to add authority for root to your display. man
xauth for more information.
hopefully, su will be modified to do xauth automatically via pam
before release, but if not, you will have to use xauth manually.
My workaround for this problem is to explicitly set a XAUTHORITY
environment variable that points to my .Xauthority file. As long as
one uses su instead of 'su -' (which would wipe out the environment)
and as long as root can still read the file after su'ing (not always
true in some NFS environments), this lets programs run after the su
still have access to the right xauth data.
A short-term workaround for RedHat might be to add something like
this to their XDM and/or startx script environments.