Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

A little background: our shop has traditionally run a Microsoft software stack but now we're planning to use embedded Linux and I find myself in the role of Columbus: conquer the new world. I mention this because it means I lack the context to interpret what you may think is a simple answer. If you can explain things with comparison to how Windows works this will greatly aid comprehension.

If I've understood the idea of X-Windows correctly, an application is an X client and the windowing APIs send/receive UI messages to an X-server via a TCP socket (sends window drawing commands to the X-server and receives mouse and keyboard activity messages from it).

As I understand it, use of sockets means that the app code can run on one Unix box while the UI runs on an X-server executing on (eg) any of

  • the same computer
  • another Unix box running X-server on the same network
  • a Windows box 'W' running X-server on the same network
  • any box running an X-server anywhere on the internet provided firewalls and routing are appropriately configured to allow the required sockets.

On my desk I have a Linux Mint13 host using the Cinnamon desktop and named ForwardUntoDawn. It is connected to my 192.168.174 network as 35, and my Win7 is on the same network as 11. They can ping each other, and SAMBA allows file sharing between them. I have installed telnetd and sshd on ForwardUntoDawn and I can establish from Win7 telnet and ssh sessions, and authenticate to obtain a command line.

On my Win7 system I have Xming installed with Xming and Xlaunch desktop icons. Running Xlaunch I answer the prompts thus:

  • Multiple Windows / display 0
  • Start program: gimp Using SSH (C:\Cygwin\bin\SSH.exe)
  • Clipboard yes, no font server or params

This momentarily results in a black command window but it vanishes before I can read the message.

Can anyone guide me on next steps, or more appropriate responses to the needs of Xming? (I chose gimp only because I know it's installed and working.)

Note that to use the answer below also read the comments and NOTE you must start your the cygwin xserver using cygwin\bin\startxwin.exe in order to get it to work, I imagine this initialises a few environment variables.

I didn't end up using Xming. After I got the ssh settings set right on the Linux box and succeeded in using the Cygwin tools, I had another go using Xming. Applications launched using Xlaunch would start but then abruptly disappear. The problem did not occur using strictly Cygwin tools.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I don't know what the defaults are for cygwin's SSH.EXE, but for openssh the default is to not enable X11 forwarding.

That default can be overridden by modifying the ssh client's config file (e.g. ~/.ssh/config on a unix/linux box) or by using the -X option on the ssh command line - e.g. ssh -X remotehost gimp

Might be worthwhile checking whether cygwin SSH.exe has the same default and/or the same or similar option.

BTW, what happens when you ssh to the Mint box and then run gimp from the command line? if it doesn't work, try again with -X.

Finally, you may want to try putty as your ssh client on the windows box.

share|improve this answer
When I ssh to the Mint box and then run gimp from the command line it says Error: Can't open display: –  Peter Wone Sep 14 '12 at 5:48
OK, that says that you need to enable X11 forwarding over your ssh connection. With openssh, you use -X on the ssh command line. It's probably the same or similar on cygwin ssh. The following URL indicates that it's nearly identical: –  cas Sep 14 '12 at 5:52
When I do the same from a command line "ssh -l mylogin -X gimp" I get the same except it isn't prefixed with "Error: –  Peter Wone Sep 14 '12 at 5:54
also, check /etc/ssh/sshd_config on the Mint box and make sure that X11 Forwarding is permitted with X11Forwarding yes –  cas Sep 14 '12 at 5:55
Enabling X11 forwarding, do I do this on the box where the X-server runs (Win7) or where the client runs (gimp on Mint13) ? –  Peter Wone Sep 14 '12 at 5:57

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.