Re: *BLUSH* Still have no idea of the xhost replacement
Once upon a time nate said...
>
> Most common problem I find is when trying to run a program
> as root on a remote system by doing su before executing the program. This
> can cause a authentication mismatch or something. Only workaround I've found
> is to login to the system as root and run it directly.
What I do in this case is:
# export DISPLAY=:0.0
# export XAUTHORITY=~user/.Xauthority
where <user> is the user you used to start the X session.
The file .Xauthority contains a magic cookie that is needed to connect
to the X server (assuming xhost has not been used to open up the
server). Normally this file is readable only to the user that owns the
file, but root can see all, so this works.
It's a shortcut to using xauth(1) to export the cookie from the users
.Xauthority file and then importing it to root's file.
Reply to: