1

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.

2 Answers 2

2

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

2
  • X11DisplayOffset 10 should be set in sshd_config?
    – sam yi
    Sep 19, 2016 at 20:03
  • @samyi: That is the default value. Sep 19, 2016 at 20:11
1

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.

You must log in to answer this question.

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