Hi,
when you use X11 forwarding with PuTTY or ssh -X a TCP Socket is opened to which each user can connect. The connection to the X11 itself is protected by an authentification cookie.
Means when you add this cookie to the session launched by su you could use X11 forwarding.
An example. Connect to a linux machine as user michael (by putty or from another linux machine)
In the session of debdev1 list all xauth cookies.
1 2 | michael@debdev1 ~
debdev1 /unix :10 MIT-MAGIC-COOKIE-1 7ea68cc88e74c1697aa6c757504fc0d7
|
Note: these cookies are stored the users home directory in file .Xauthority => ~/.Xauthority
Then switch to another user on this machine
When you try to start a X11 client you got some errors like this
1 2 | helena@debdev1 ~
Can 't connect to X11 window server using ' localhost:10.0' as the value of the DISPLAY variable.
|
Then verify you already have a ~/.Xauthority file
If not create a new file
and add the authentification cookie
Then you should be able to start X11 programs
Michael