Using X via ssh from one windows machine to another

Brian Keener
Wed Nov 8 17:46:00 GMT 2006

I'm stumped - I have tried googling for references to this problem 
and I am sure it has been discussed there before but I haven't hit on the 
correct keywords yet.  

I have Cygwin and X installed and from a bash prompt I can:

BrianK@atl-lt-5783 ~
$ X -clipboard&
[1] 3632
<snip all the startup stuff>
BrianK@atl-lt-5783 ~
$ DISPLAY=:0.0;export DISPLAY

BrianK@atl-lt-5783 ~
$ twm&
[2] 2484

BrianK@atl-lt-5783 ~
$ winProcEstablishConnection - Hello
winInitClipboard ()
winClipboardProc - Hello
winProcEstablishConnection - winInitClipboard returned.
DetectUnicodeSupport - Windows NT/2000/XP
winClipboardProc - DISPLAY=
winClipboardProc - XOpenDisplay () returned and successfully opened the 

winProcSetSelectionOwner - Clipboard not yet started, aborting.
winProcSetSelectionOwner - Clipboard not yet started, aborting.

I will now have a nice X Desktop and can start additional additional programs 
and connections like:

BrianK@atl-lt-5783 ~
$ xterm -bg blue -fg white &

I will get an xterm on my Xdesktop for this computer.  I can also use ssh to 
connect to a VMware linux machine on this same machine or others as in :

BrianK@atl-lt-5783 ~
$ ssh -X -f -l briank atl-lt-5783-lnx xterm -fg grey -bg midnightblue -cr red
$ ssh -X -f -l briank softsrc-vm-lnx xterm -fg grey -bg midnightblue -cr red

I will get xterm sessions on my Xdesktop connected to either of these 2 linux 
machines but if I try to connect to my current workstation or another windows 
machine (either of which is running sshd as a service) the connection will 

$ ssh -X -f -l briank atl-lt-5783 xterm -fg grey -bg midnightblue -cr red
$ ssh -X -f -l briank softsrc-vm xterm -fg grey -bg midnightblue -cr red

ssh will actually ask for the password but then return to a command prompt.  If 
I instead do a :

$ ssh -X -l BrianK atl-lt-5783
$ ssh -X -l BrianK softsrc-vm

You have to remove the -f option since I am not specifying a program to run 
name and I will get a bash session on these two machines but if I then try to 
run xterm I will get an unable to open display error:

BrianK@atl-lt-5783 ~
$ ssh -X -l BrianK atl-lt-5783
Enter passphrase for key '/home/BrianK/.ssh/id_rsa': 
Last login: Wed Nov  8 12:23:56 2006 from
You are successfully logged in to this server!!!

BrianK@atl-lt-5783 ~
$ echo $DISPLAY

BrianK@atl-lt-5783 ~
$ xterm
xterm Xt error: Can't open display: 
xterm:  DISPLAY is not set

BrianK@atl-lt-5783 ~

granted in this case I am connecting to the same machine but even when I try 
this same scenario against the softsrc-vm machine I get the same result.  
Shouldn't the DISPLAY have been set by ssh.  I did notice my CYGWIN= is env is 
set to 'ntsec' only and I seem to recall something about it should be set for 
'ntsec tty'. 

Can someone point me to what I am missing here.  Like I say the Windows to 
Linux works great - just having trouble with the to Windows (either Windows to 
Windows or Linux to Windows) because I also tried from Linux to one of these 
Windows systems and cannot connect there either.

As a side note out of curiosity - why do I sometimes get these lines during twm 

winProcSetSelectionOwner - Clipboard not yet started, aborting.
winProcSetSelectionOwner - Clipboard not yet started, aborting.

But then sometimes I do not get the above but instead one indicating success.

Thanks for any and all insights and suggestions.


Unsubscribe info:
Problem reports:

More information about the Cygwin-xfree mailing list