SSH with X11 forwarding after su

You can SSH to a server with X11 forwarding to allow you to run X11 (graphical) applications on the server and have them show up on your local machine.

ssh -X [the user]@[the server]

However, if you then run su to log in as a different user, you'll probably receive the following error when you run an X11 application:

X11 connection rejected because of wrong authentication.
X I/O error

Prevent this error by exporting, after su, the authority you gave the initial user to run X11 applications:

export XAUTHORITY=/home/[the user]/.Xauthority

References

Last modified: 24/09/08 11:32:23
Go to top

Related Pages

No related pages or links.

Login/out

Login

Forgot Password?
Go to top
Go to top