Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

share|improve this answer

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):



env | grep DISPLAY

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

Hope this helps.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .