Linux – Cannot open software remotely XQuartz Xlib: Invalid MIT-MAGIC-COOKIE-1 key

linuxunixxorg

I am using mac os 10.8.2, and connecting to a cloud computing cluster through Xquartz.

I do:

ssh -CY <uname>@serveradress
and then ./<softwaretoopen>

and it opens the software perfectly fine, but it is common that for some reason I loose the connection, and then when I try again I get the error:

ssh -CY <uname>@serveradress
and then ./<softwaretoopen>
Xlib: connection to "<servername>" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key

Then if I restart my computer and try again it's good again, but this is becoming extremely annoying since everytime I get disconnected have to close all open software, restart computer and try connecting again.

Any idea how to solve such issue?

Thanks in advance!

Best Answer

I found the asnwer in link at the bottom of the page.

Basically what I have to do without restarting the computer is to:

rm ~/.Xauthority*

On the server, then close X11, then re-open X11 and connect to the server again.

Thanks!

http://slopjong.de/2011/06/14/invalid-mit-magic-cookie-1-key/

Related Question