ssh -X : connect /tmp/.X11-unix/X0: No such file or directory

Ronald Fischer
Fri Apr 20 10:43:00 GMT 2012

My setup so far (which is working well), was to use Xming as X-Server
and putty for logging into our Solaris hosts via ssh. Since I have
Cygwin installed, I thought I could use its ssh equally well, so I
exported the ssh key from putty to the format understood by ssh, and
used the following bash command to login to the Solaris host:

  DISPLAY=:0.0 TERM=xterm  ssh -p 22 -K -X -i MyPrivateKeyFile 

When I now try to start an X application, I get an error message like

 connect /tmp/.X11-unix/X0: No such file or directory 
 XIO:  fatal IO error 131 (Connection reset by peer) on X server
       after 0 requests (0 known processed) with 0 events remaining.

Further investigation reveals the following:

(1) I start my putty login, and find that on the remote host DISPLAY is
set to (say): SolarisHost:261.0
Starting X applications works fine.

(2) I start my open ssh login from Cygwin, and find that the DISPLAY
variable is set to a different value, for example SolarisHost:239.0 .
Starting X applications does not work.

(3) In the latter shell, I export DISPLAY=SolarisHost:261.0 . Starting X
applications now works. 

The fact that each login produces a different value for DISPLAY, is
normal behaviour. Even when starting several putty sessions, each gets a
different value for DISPLAY, and X apps work in all of them.

It seems that by doing the ssh connection via putty, something is done
which is missing from my ssh started from Cygwin. 

BTW, I also tried to use -Y instead of -X in my ssh invocation, but with
no effect.

Ronald Fischer <>
+  If a packet hits a pocket on a socket on a port, 
+  and the bus is interrupted and the interrupt's not caught,
+  then the socket packet pocket has an error to report.
+		(cited after Peter van der Linden)

Unsubscribe info:
Problem reports:

More information about the Cygwin-xfree mailing list