Problem with running X apps

Thomas Chadwick j_tetazoo@hotmail.com
Mon Aug 5 09:10:00 GMT 2002


First, I would recommend against running XWin directly.  Use the provided 
startxwin.bat batch file instead and then run the ssh command from an xterm.

However, if you REALLY want to do it this way, you need to set the DISPLAY 
variable FIRST, then launch XWin, then run ssh with X forwarding turned on:

cygwin> export DISPLAY=locahostname:0
cygwin> XWin <options> &
cygwin> ssh -X -l remoteusername remotehostname

Once logged into the remote host, you can start running your Xclients right 
way.  No need to set the DISPLAY variable yourself (or run xhost).  Ssh will 
have already taken care of all of that.  In fact, setting the DISPLAY 
variable as you describe below CIRCUMVENTS THE SSH CONNECTION ENTIRELY and 
sends your XWindows traffic unencrypted!

By the way, if the file .Xauthority exists in your home directory on 
localhostname, it might cause problems.  If you find you are getting errors 
that refer to "MIT-MAGIC-COOKIE", then delete the .Xauthority file and try 
again.

>From: "Kerry Sanders" <ksanders@mindspring.com>
>Reply-To: cygwin-xfree@cygwin.com
>To: <cygwin-xfree@cygwin.com>
>Subject: Problem with running X apps
>Date: Sat, 3 Aug 2002 23:42:35 -0500
>
>I am having a problem after installing Cygwin/XFree when I try to login
>to my Redhat 7.3 box from a WinXP machine.  I launch the Cygwin batch
>file and from the Cygwin prompt, I issue the following commands:
>
>cygwin>XWin -unixkill &
>
>cygwin>xhost +earth
>
>cygwin>ssh -l uksand earth
>
>
>At this point, I am logged into the Linux box with no problems.  I then
>export my display with the following command:
>
>     export DISPLAY=mars:0.0
>
>
>When I then try to launch xlogo, I get the following error information:
>
>[uksand@earth uksand]$ xlogo
>Xlib: connection to "mars:0.0" refused by server
>Xlib: No protocol specified
>Error: Can't open display: mars:0.0
>[uksand@earth uksand]$
>
>
>
>I am hoping that someone will have input on this.  By the way, in this
>example, earth is my Linux box.  Mars is my WinXP box.  Of course, my
>wife's machine (unnecessary in this example) is venus.  :)




_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx



More information about the Cygwin-xfree mailing list