3

Is it possible to restart an X11/Xwindows session without having to exit the server I've SSH'd to?

I'm currently using iTerm on OSX, and every so often X11 (I guess) times out (giving me the error below)

Vibrant applications require X Windows

and I have to exit the server, restart ITerm and then SSH back in which is frustrating. I've already tried a solution I saw previously by adding an X11 timeout parameter to my config like so:

host someserver
    Hostname 111.222.33.444
    User joe
    ForwardX11 yes
    ServerAliveInterval 300 

ForwardX11Timeout 595h

But it's still not totally robust, so to reiterate, can I, in any way, restart X11 without interrupting my connection status with the server?

Or better yet, is there some other method that can prevent it happening in the first place?!

  • Another method would be to start a VNC session on the server and then reconnect to that when the connection borks. – thrig May 9 '16 at 17:17
  • Are you using ssh -X or ssh -Y to connect to the server? – derobert May 9 '16 at 18:05
  • Neither, as I was under the impression that if you set ForwardX11 yes in ~/.ssh/config then -X or -Y were no longer needed? – Joe Healey May 9 '16 at 19:25
2

You're probably seeing the xauth timeout that ForwardX11Trusted no sets. You can change the length of the timeout with ForwardX11Timeout, but unfortunately you can't set that very long—it will crash the X server (or maybe just error out in newer Xorgs). See the question Disable ForwardX11Timeout without ForwardX11Trusted in OpenSSH Client?

You can set ForwardX11Trusted yes or use ssh -Y to disable the timeout entirely, though.

  • Ok great, will give the Trusted flag a go! – Joe Healey May 11 '16 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.