I'm having an issue where attempting to detach a remote, active IPython session (via Tmux) with matplotlib imported, then logging out of SSH hangs. I have to Crtl-C to kill the process. When I SSH back into the machine, the tmux process is gone.
Example IPython:
~$ ssh-desk # ssh into remote machine
~$ tmux
~$ ipython
In [1]: import matplotlib.pyplot as plt
Crtl-b Crtl-b d
[detached (from session 0)]
~$ tmux ls
0: 1 windows (created Wed May 2 16:52:58 2018) [78x38]
~$ exit
logout
(process hangs here)
Ctrl-c
~$ ssh-desk
~$ tmux ls
no server running on /tmp/tmux-1000/default
I did get an error once about the X11 session being terminated. I think this is because I'm using ssh -Y to have X11 forwarded for graphics.
The X11 connection broke (error 1). Did the X11 server die?
Is there a way to run matplotlib within IPython/Python and detach the tmux session and logout successfully?
I'm on Linux Mint 18.3 (both local and remote machines), IPython 6.3.1
UPDATE I've googled every potential solution to detaching tmux sessions with X11 forwarding and couldn't get it to work, including putting some DISPLAY code in the .bashrc file. I also tried using xpra, but got an error that the module rencode couldn't be found.