Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 am new to Xming. I have installed and have connected to a server using Putty. But when I type "xclock" for testing there is no output. It just remains like that.

share|improve this question

Check that Xming is accepting connections from the remote host. You can temporarily accept all connections by running Xming with the -ac option. Also check in your putty options for the session that Connection > SSH > X11 > Enable X11 forwarding is enabled.

share|improve this answer

If you don't get an error message, it means that xclock is displaying a window, it could reach your X11 display. So your problem is that you aren't seeing Xming's window.

You have probably configured Xming to display X applications inside an Xming window, so navigate to the Xming window (this “one-window” mode is the default). Alternatively, configure Xming to display X windows on the Windows: start Xming in “multiwindow” mode. See the Xming manual for more information.

It's also possible (but unlikely) that you've done something weird in your configuration file and are overriding the DISPLAY variable. It is extremely rare that overriding DISPLAY in .profile or .bashrc or similar files can do anything useful. If you're also logged in inside X on the server's console, and you've overridden DISPLAY to be :0, then xclock is being displayed on the server's GUI.

share|improve this answer
xming is working properly when i tested in one server.But am having issues with othr server when i set DISPLAY as :0 and i give command xclock it doesnt show any errors but i am not able to see clock in my machine.But otherwise am getting error "Error: cannot open display: localhost:0" – eucap Sep 12 '12 at 5:00
Also if i set the DISPLAY as my export DISPLAY= (system ip )and i try to run firefox it doesnt show any errors but output is not getting displayed. – eucap Sep 12 '12 at 5:08
Don't set DISPLAY. Never set DISPLAY over SSH (including PuTTY): if the SSH forwarding is working, the environment variable will be set correctly. If the variable isn't set, you aren't getting X forwarding. Check that you've enabled forwarding in the PuTTY client, that you have DISPLAY set on the client side (with Xming, typically to localhost:0) and that the server allows X11 forwarding (X11Forwarding yes in sshd_config). – Gilles Sep 12 '12 at 7:22
I performed steps what you have told.Didnt set the Display in putty .Enabled forwarding . And i logged in to the server and set the DISPLAY to localhost:0 .But no errors,but am not able to see the windows of xclock .As i said on one server it worked well.Also can i know where to look for ssh_config file ? – eucap Sep 12 '12 at 8:11
@eucap Again: Do not set DISPLAY manually. Make sure you've set the X display location in PuTTY, and that the server accepts X11 forwarding. – Gilles Sep 12 '12 at 8:14

Your Answer


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.