I followed numerous guides for setup and even more "can't open display" error solution, but still can't find what's wrong. First, on VPS Debian Squeeze I installed xserver-xorg-core and xauth.

Then on Windows 7 installed xming Then configured putty 2012-11-09:r9690 This is putty config:

putty config

sshd_config on VPS is set to:

X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

Xauthority file is created in ~/.Xauthority. $DISPLAY is localhost:10.0

I first start xming, then connect with putty.

When I type xlogo I get Error: Can't open display: localhost:10.0.

I put VPS's IP in x0.hosts in xming folder. Tried to change DISPLAY to my IP, :0, localhost:0... I can't even remember the combinations. Tried to put localhost:0 in putty config. I even changed the order of lines in /etc/hosts as I saw in one answer, but nothing works.

Update: This is putty eventlog:

2013-03-03 15:58:14 Looking up host "IP"
2013-03-03 15:58:14 Connecting to IP port 22
2013-03-03 15:58:14 Server version: SSH-2.0-OpenSSH_5.5p1 Debian-6+squeeze2
2013-03-03 15:58:14 Using SSH protocol version 2
2013-03-03 15:58:14 We claim version: SSH-2.0-PuTTY_Snapshot_2012_11_09:r9690
2013-03-03 15:58:14 Doing Diffie-Hellman group exchange
2013-03-03 15:58:14 Doing Diffie-Hellman key exchange with hash SHA-256
2013-03-03 15:58:15 Host key fingerprint is:
2013-03-03 15:58:15 ssh-rsa 2048 3f:6e:7d:6c:14:6a:3e:18:0d:d4:05:c9:b2:60:d3:00
2013-03-03 15:58:15 Initialised AES-256 SDCTR client->server encryption
2013-03-03 15:58:15 Initialised HMAC-SHA1 client->server MAC algorithm
2013-03-03 15:58:15 Initialised AES-256 SDCTR server->client encryption
2013-03-03 15:58:15 Initialised HMAC-SHA1 server->client MAC algorithm
2013-03-03 15:58:19 Sent password
2013-03-03 15:58:19 Access granted
2013-03-03 15:58:19 Opening session as main channel
2013-03-03 15:58:19 Opened main channel
2013-03-03 15:58:19 Requesting X11 forwarding
2013-03-03 15:58:20 X11 forwarding enabled
2013-03-03 15:58:20 Allocated pty (ospeed 38400bps, ispeed 38400bps)
2013-03-03 15:58:20 Started a shell/command

Where can I check elsewhere? Any solution to this?

  • If you right click on PuTTY's title bar, you can view the event log. Please copy its output in your question. – jippie Dec 25 '12 at 11:30
  • Hi, I hope I'm not late. I pasted the event log. – cikatomo Mar 3 '13 at 16:23

Check if Windows firewall is blocking TCP on localhost:6010.

Try the following little procedure to check if you can connect to the remote X-server (Xming) after setting up an SSH session with PuTTY. Notice port 60xx where xx is identical to the number you find in echo $DISPLAY:

$ echo $DISPLAY 
$ netstat -an | grep 6010
tcp        0      0*               LISTEN     
tcp6       0      0 ::1:6010                :::*                    LISTEN     
$ telnet
telnet: could not resolve Name or service not known
$ telnet 6010
Connected to
Escape character is '^]'.
telnet> quit
Connection closed.

When the X-server cannot be reached this is what happens:

$ telnet 6011
telnet: Unable to connect to remote host: Connection refused
  • I turned off windows firewall and did telnet and it connected to 6010, just like you pasted here, but still not working. – cikatomo Mar 3 '13 at 16:22
  • Like the Connected to – jippie Mar 3 '13 at 22:05
  • yes, $ telnet 6010 $ Trying $ Connected to $ Escape character is '^]'. – cikatomo Mar 4 '13 at 23:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.