my computer is windows 10, I installed a ubuntu 18.04 by virtualbox.
I want to run a python program in ubuntu from my windows and with graphical output.
However after running the program, it always reported:
Could not find ':' in DISPLAY: needs-to-be-defined
Unable to init server: Could not connect: Connection refused
(Original:2079): Gtk-WARNING **: 14:39:33.441: cannot open display: 127.0.0.1:10.0What I have done:
1: I did the setting in the /etc/ssh/sshd_config turned on:
ForwardX11 yes
ForwardX11Trusted yes2: login with: ssh username@pc-name -X
3: changed the ip address:
$ export DISPLAY=127.0.0.1:10.0 # original was localhost:10.0Do you know, what's wrong? Why I can not see the picture?
41 Answer
The Ubuntu side looks OK, but you need an X server on the Windows side. Windows does not come with an X server so you have to install one. There are free ones like vcxsrv you can get. Haven't used it myself.