Skip to content

X11

src: https://unix.stackexchange.com/questions/590448/how-do-i-speedup-x11-forwarding-through-ssh

TODO

To check you can connect, you can temporarily allow all hosts to connect without authorization:

xhost +

On the client, run an X11 application with the display set to the remote server, eg (assuming the server is called remote) DISPLAY=remote:0 xlogo or xlogo -display remote:0. If this works, on the server reverse that setting, with xhost -, and either use other more limiting xhost options, or copy the MIT magic cookie key from the server's ~/.Xauthority file. To do this, on the server run

xauth list

and choose the line that has the server's name, e.g.

remote/unix:0 MIT-MAGIC-COOKIE-1 653dc9bd80294684b4944f2babf2fd0c

(There may be more lines, ensure you choose the right one). On the client, enter this key to the local authority file (using the name:display without the /unix since it is over tcp):

xauth add remote:0 MIT-MAGIC-COOKIE-1 2ac06b3b50200461378d0b8622f6d9f6

You should now be able to run applications again, just setting the display.