I have a centos server with barebones X11 installed. I am trying to connect to this server from my Windows box with Putty and Xming.

I have set X11Forwarding to yes in the sshd_config file. I have install x11 apps and xauth. I connect to the server with Putty with X11 forwarding enabled and pointing to localhost:0 and I have the Xming server running.

Trying to run xclock, I always get "Error: Can't open display". Any ideas what I can check or what I am missing. I have been googling since 2h already!

P.S. I am not running an X server on the server side. I am not sure I can do this with a VPS.

link|improve this question
feedback

2 Answers

localhost:0 is almost certainly wrong. sshd starts at :10, and sets $DISPLAY for you already.

link|improve this answer
feedback

xclock seems buggy with new Putty & Xming versions.

I suggest you try some other command like xlogo, xterm or rdesktop to test (wait at least 5s) .

If it's still not working, check the $DISPLAY env variable on the server (CentOS):

echo $DISPLAY

or

env | grep DISPLAY
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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