Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

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

share|improve this answer
add comment

xclock seems buggy with new Putty & Xming versions.

I suggest you try some other command like xlogo, xterm or xev 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

UPDATE: here's a step-by-step guide:

http://ducquoc.wordpress.com/2012/09/08/putty-x11forward-xming/

Hope this helps.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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