IPython session on ssh exits when X11 server dies
Asked Answered
A

0

9

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?

Allard answered 4/6, 2020 at 8:0 Comment(3)
Same here, I couldn't find much about how to work around this... I guess one way could be to try and keep the server running after disconnecting like this, but I still have to try it out.Evanesce
Have this problem for several years with no solution. I now simply avoid -X or -Y flag of ssh. Interestingly, sometimes there is a lucky terminal window where ipython does not crash.Satsuma
This isn't a solution, but I have a similar setup, and I switched to using ipython in vnc using ssh tunneling with i3. i3 has some issues in fullscreen mode but there are some kludgy ways to get it to work where you can get your plots etc to show up.Centralia

© 2022 - 2024 — McMap. All rights reserved.