I use IPython over ssh, usually inside a tmux session on the server machine, so that if I lose connection or anything else goes wrong, I can come back. The problem is that, after long periods of inactivity, for example if I turn off my client machine and go to bed, then the day after, when I try to reconnect to tmux containing the IPython session, there's often the following error message:
The X11 connection broke (error 1). Did the X11 server die?
And the IPython session is dead, together with all my variables. I think this has to do with the fact that I ssh using X forwarding (ssh -X
), because sometimes I need to use GUI applications.
Is it there a way to force IPython to NOT exit the session whenever this problem with the X11 server happens?
-X
or-Y
flag ofssh
. Interestingly, sometimes there is a lucky terminal window where ipython does not crash. – Satsuma