Additionally, my recent SSH Notes email describes the scenario that you are in (next to last item on the list):
http://cygwin.com/ml/cygwin-xfree/2002-10/msg00065.html Harold Igor Pechtchanski wrote: > On Thu, 10 Oct 2002, Matthew Bailey wrote: > > >>I have the latest version of Cygwin and ssh. I am trying to display >>another program remotely which I'm using Xwin32 5.2 to allow the display. >> >>The server always responds Can't connect to display :"0.0". >> >>I looked at my man pages for ssh and used the flag -X to enable forwarding >>of my X11. But, the server still responds the same, and will not allow me >>to display my program. >> >>Can anyone help me with this problem? >> >>Thanks, >>M. Bailey > > > I'm sure this'll get redirected to cygwin-xfree, so I'm replying straight > there. > > ssh, when run with X forwarding, sets up a special display on the target > machine. The value of the DISPLAY variable should reflect that. > There are a couple of possibilities: > > 1) You are running 'ssh -X' from a bash prompt that does not have DISPLAY > set. In this case ssh will silently ignore the -X option and will not set > up X forwarding. To fix this, set DISPLAY to "localhost:0.0" before > invoking ssh. > > 2) (more likely from your symptoms) You have a login script that > automatically sets the DISPLAY to :0.0 on the target machine, overriding > the ssh-set value. To fix this, find which script does that (could be > .bashrc, .profile, some other rc script, could even be /etc/profile if > your system administrator is sadistic/incompetent), and bracket the line > that assigns DISPLAY by (for sh/ksh/bash) 'if [ -z "$DISPLAY" ]; then' and > 'fi'. > > Hope this helps, > Igor
