Notes on X Window System
X Windows authorization
Keywords: vnc, remote desktop.
Suppose you are user foo. Do this to execute a graphical application as another user bar.
Make foo’s magic cookie readable by bar. Environment variable XAUTHORITY
holds the location of such cookie. So for example
The magic cookie is usually $HOME/.Xauthority
or /var/run/<name of display
manager>/foo
.
Then get the value of foo’s display, in variable DISPLAY
.
Login as bar and
Then just launch the application from the same terminal.