-1

I am using Mininet on a remote Ubuntu without GUI. And I am trying to use "xterm h1" to open a terminal on a virtual host in Mininet. But it showed me always there is no display connected. I am trying to use other X application like firefox and it showed me "No protocol specified Unable to init server: Could not connect: Connection refused Error: cannot open display: :0.0"
Then I have set X11forward yes in sshd_config on the remote Ubuntu, and install Xlaunch on my windows but showed no changes. Can someone tell me how to solve this problem? PS. I am using a pycharm on Windows11 to establish this SSH session

Djarlo
  • 5
  • 2

1 Answers1

0

Since you are running windows you will first need an application that will run an X11 server on your windows, Xming, for example. You will then need to configure your ssh connection to use that xserver. Finally you want to setup the DISPLAY variable at your remote to be LOCAL_IP:0 where LOCAL_IP is the public IP of your machine.

Misho Janev
  • 512
  • 5
  • 13
  • Hey Misho, thanks very much for your reply. Now it worked when I start a ssh session via putty. But it still shows me "error : cannot connet to display" when I start a session with pycharm, which is really weird. I tried it with pycharm again on my local Ubuntu ( I have dual OS locally) and it always works. So the problem still exists with pycharm on my local windows – Djarlo Nov 06 '22 at 18:16
  • Not sure how you are opening the connection from pycharm but I'd suppose it does not enable X11 forwarding (the default) so you have to modify that. – Misho Janev Nov 10 '22 at 13:49
  • Thank you,after modify the environment variable “ display” in pycharm, it works – Djarlo Nov 15 '22 at 16:14
  • Glad I could help, consider accepting the answer on the thread @Djarlo – Misho Janev Nov 17 '22 at 22:51