This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygwin's ssh with Xwin


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
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Water molecules expand as they grow warmer" (C) Popular Science, Oct'02, p.51


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]