This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 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


Harold,

While I don't doubt your expertise with XFree86, I would like to
respectfully disagree with your statement.  The next to last item on the
list (#5, IIRC) describes the same scenario that I mentioned as #1, and it
seems unlikely.  When 'ssh -X' is run from a prompt with no DISPLAY set,
the resulting message on the ssh target host is, e.g., 'xterm Xt error:
Can't open display:'.  Matthew's error explicitly states the ':0.0' as the
display number...  So, it looks like something does set the display, but
to the wrong value.  This is not to say that he might not have BOTH
problems at once, i.e., once he finds what sets his display, he'll still
have no X forwarding, but his immediate problem is, apparently, not what
you mentioned.
	Igor
P.S. I don't mean to be nitpicking here, just want the archives to reflect
the correct information...

On Thu, 10 Oct 2002, Harold L Hunt II wrote:

> 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

-- 
				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


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