I have installed and have connected to a server using Putty. But when I type "xclock" for testing there is no output.
2 Answers
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.
- 11
- 1
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.
- 807,993
- 194
- 1,674
- 2,175
-
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 05:00
-
Also if i set the DISPLAY as my export DISPLAY=174.16.36.177:0 (system ip )and i try to run firefox it doesnt show any errors but output is not getting displayed. – eucap Sep 12 '12 at 05: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 'SO- stop being evil' Sep 12 '12 at 07: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 08:11
-
@eucap Again: **Do not set `DISPLAY` manually.** Make sure you've set the X display location [in PuTTY](http://the.earth.li/~sgtatham/putty/0.62/htmldoc/Chapter4.html#config-ssh-x11), and that the server accepts X11 forwarding. – Gilles 'SO- stop being evil' Sep 12 '12 at 08:14
-
Ok.I have set x display location in Putty and when i tried i got error " dev2@dev2-Precision-WorkStation-T3500:~$ xclock & [1] 31644 dev2@dev2-Precision-WorkStation-T3500:~$ Error: Can't open display:" .Also can you please tell me where to check for ssh_config file ? – eucap Sep 12 '12 at 08:21
-
I was able to locate sshd_config file .It is set to yes in that file.Also whne i do echo $DISPLAY on server there is no output – eucap Sep 12 '12 at 08:30
-
I compared the server where it is working with one where it is not.I am doing the same steps,but wonder y it works in only i server.When I do echo $DISPLAY on server where it is working i get localhost:10.0 . – eucap Sep 12 '12 at 09:26