I connected to my Mint18 (Ubuntu 16.04) system remotely from my windows10 machine with Putty. The internet connection is provided with a Wi-Fi and a VPN connection. I name, here, the IP address for the Wi-Fi connection as Wi-Fi-IP and for the VPN connection as VPN-IP.
I want to run graphical programs such as gedit on the remote Mint18 system; however, I only face with the Cannot Open Display
error. I studied all the provided solutions for X11 forwarding:
- Installed Xming
- Enabled the X11 forwarding in the Putty
- Set the
X display location
aslocalhost:0.0
in the Putty (I also tried all the steps without setting this!)
After connecting to the remote system, I did the following steps:
- In the
/etc/ssh/ssh_config
:- Removed the hash
#
in the linesForwardAgent
,ForwardX11
,ForwardX11Trusted
, and set the corresponding arguments toyes
. - Removed the front hash
#
beforePort 22
andProtocol 2
, and also appended a new line at the end of the file to state the xauth file location,XauthLocation /usr/bin/xauth
- Removed the hash
- In the
~/.bashrc
: Appendedexport DISPLAY=localhost:0.0
. (I name this the DISPLAY-value here for simplicity)- I also tried this step with the
export DISPLAY=127.0.0.1:0.0
,export DISPLAY=Wi-Fi-IP:0.0
, andexport DISPLAY=VPN-IP:0.0
- I also tried this step with the
- Another solution was to use
export DISPLAY=:0
on the command line. It neither produced the error nor opened the program graphically. - Exited the session and opened a new one to let these settings be applied.
After all the steps, I ran gedit &
but I got Cannot Open Display:DISPLAY-value
error and none of the solutions fixed the problem. How can I fix this problem?