linuxpycharmx11mininetx11-forwarding

How to open a xterm terminal in a SSH connection with a remote Ubuntu without GUI


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


Solution

  • 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.