Python code crashes with “cannot connect to X server” when detaching ssh+tmux session
问题 I run Python code on a remote machine (which I ssh into) and then use Tmux. The code runs fine UNTIL I disconnect from the remote machine. The whole point of my connecting via Tmux is so that the code continues to run even when I'm not connected to the remote machine. When I reconnect later, I have the error message: : cannot connect to X server localhost:11.0 Does anyone have an idea why this is happening or how I can stop it? 回答1: cannot connect to X server localhost:11.0 ...means that your