I'm trying to ssh a machine via xshell 5. And Xmanager (Passive) is working on background. I try to export display like this

export DISPLAY=10.126.*.*:0.0

But nothing shows up. When i type CTRL+Z, it returns

[1]+  Stopped                 xclock

*Firewall is turned off.

*Im trying to run xclock on remote machine and show on the local machine.

  • 1
    The absence of an error message indicates that the X connection probably worked. Can you clarify if you are running xclock locally and want it to show on the machine you are sshing into, or the reverse? Also, is this something you could do using ssh -Y instead?
    – dhag
    Dec 2, 2015 at 13:49
  • Im trying to run xclock on remote machine and show on the local machine.
    – YErdogan
    Dec 2, 2015 at 14:41
  • Are you running a X server on the client? Does it work if you use something like PuTTY + XMing (from Windows) or ssh -X (from a *NIX machine running X11)? Dec 2, 2015 at 14:49
  • Also tried with putty with X11 forwarding, same result.
    – YErdogan
    Dec 2, 2015 at 15:10

2 Answers 2


Unless Xshell (which I'm not familiar with) is doing something unusual, you must not set DISPLAY. Under a normal SSH connection, either SSH sets DISPLAY automatically, and everything works, or SSH doesn't set DISPLAY, and then setting it manually cannot work because that means SSH isn't relaying the X11 connection.

So first, stop doing export DISPLAY. Then, if xclock doesn't work, you can begin to investigate why. The first thing to check is echo $DISPLAY: does it look reasonable? It would typically be something like localhost:10.0, with the host part localhost because the SSH server is relaying connections the SSH server machine where the X clients will be running to the SSH client machine which is running the X server. OpenSSH uses the first free display number starting at 10 (you'll get a higher number if there are other remote X connections already).

If DISPLAY is set to a bad value, check your initialization file: make sure that they don't set DISPLAY.

If DISPLAY isn't set at all, check your Xshell settings. Make sure that it's configured to forward the X connection. And make sure that it has an X connection to forward in the first place (Xmanager must be running, and Xshell must be aware of it — once again, because I don't know Xshell, I don't know if that's supposed to work automatically or if you need to e.g. set an environment variable).


I am not familiar with Xshell 5 or Xmanager but I assume they are commercial products that provide a terminal emulator and X server for windows. If such - they may provide commercial support as well.

In the mean time, can you check that X11 forwarding actually works on that machine?

For example, you can test using PuTTY + XMing (both free). You should also check the ssh log (ssh -v or right click the PuTTY title bar - View Event log to get more information.)

If it works using this setup - then you haven an issue with Xshell / Xmanager. If not - troubleshoot your X11 configuration.

You can get additional information from sshd as well, by putting in debug mode. See http://www.radix50.net/~ibr/notes/20071120-0-X11Forwarding.html

You must log in to answer this question.

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