【终极!!!】cannot connect to X server / couldn't connect to display

Local: Windows 10

远程: Linux Ubuntu 16.04

Connection: server including the network, and between the local network through a VPN connection, then log on locally to the server via SSH

Symptoms: VNC remote desktop to the server, the local server through ping, ping the local server fails. (This issue after the repair, too, but here is explain to the environment. The company's VPN quite powerful, can control a lot of things)

Cause: You might be a proxy address to a rogue software changed! !

Code (code on the server, log on locally to the server via ssh, then run this code):

img_dir = '/home/data/1.jpg'

from matplotlib import pyplot as plt

img = plt.imread(img_dir)
plt.imshow(img)
plt.show()

Error:

(1)cannot connect to X server

(2)_tkinter.TclError: couldn't connect to display

Or run over and there is no display.

 

solve! !

This problem does not know will not toss you one day, anyway, will toss my day!

Exhausted all x server (xming xmanager vcxsrv, xshell moba-xterm, .........), ssh, root causes are not effective in all kinds of torment! ! as follows:

 

Your C ,,, L ,,, O ,,, U ,,, D ,,, S ,,,, S such software FQ unloaded. Restart the computer! ! Or other agent software that you should not use. If you're like me to use the corporate VPN Internet, then! ! ! ! !

 

The same problem causes, see:

1,win10 pycharm 打不开 console Couldn't connect to console process Process finished with exit code 129

2, Python win10 PyCharm remote connection ubuntu can not display pictures can not connect to X server 10.xxx.xxx.xxx:0.0

3,_tkinter.TclError: couldn't connect to display

Published 174 original articles · won praise 61 · views 240 000 +

Guess you like

Origin blog.csdn.net/qxqxqzzz/article/details/104824876