SSH not setting DISPLAY variable

From: Adam Nielsen (a.nielsen@optushome.remove.com.au)
Date: 07/28/02


From: Adam Nielsen <a.nielsen@optushome.remove.com.au>
Date: Sun, 28 Jul 2002 19:37:09 +1000

Hi,

I'm having a rather strange problem with OpenSSH (3.1p1) forwarding X11
connections. Because I want to forward the X11 connection through multiple
computers, I originally though that was the problem, however I've narrowed
it down to the final computer in the chain.

I have two computers running Slackware 8.0, both using the same version of
SSH and one of them works perfectly, but the other one does not. And as
both computers are set up almost identically I don't know what could be
wrong. This is what happens on the computer that works:

bash$ ssh localhost -X
password:
bash$ echo $DISPLAY
localhost:10.0
bash$ logout

On the second computer, "echo $DISPLAY" just gives a blank line, so
obviously no X programs will run. It also only affects incoming
connections - if I connect out from the not-working computer to somewhere
else then the connection is forwarded back to my display ok, but I can't
get my computer forwarded back to someone else's display.

If I run ssh in verbose mode, I get these lines towards the end:

...
debug3: tty_make_modes: 91 1
debug3: tty_make_modes: 92 0
debug3: tty_make_modes: 93 0
debug2: x11_get_proto /usr/X11R6/bin/xauth list :0.0 2>/dev/null
debug1: Requesting X11 forwarding with authentication spoofing.
debug1: channel request 0: x11-req
...

These lines are the same on both computers.

I think the problem lies with "xauth" - if I run "xauth list" on the
working computer, there is a new entry added after I've ssh-ed to it,
however the non-working computer's xauth list remains unchanged. Does
anyone know what's going on??? I hope I haven't confused you too much ;-)

Thanks,
Adam.



Relevant Pages

  • Re: SSH not setting DISPLAY variable
    ... > I'm having a rather strange problem with OpenSSH forwarding X11 ... > SSH and one of them works perfectly, but the other one does not. ... > On the second computer, "echo $DISPLAY" just gives a blank line, so ... > connections - if I connect out from the not-working computer to somewhere ...
    (comp.security.ssh)
  • Re: x11-forwarding
    ... -Y Enables trusted X11 forwarding. ... Das ist m.E. *keine* korrekte Angabe für DISPLAY (darauf deutet ja auch ... debug1: Authentication succeeded. ... using fake authentication data for X11 forwarding. ...
    (de.comp.sys.mac.misc)
  • Re: X11-Programm von Linux auf Mac OS X umlenken
    ... Abschnitt "X11 and TCP Forwarding": ... | DISPLAY environment variable is set), the connection to the X11 display ...
    (de.comp.sys.mac.misc)
  • Re: openSSH of Solaris/Debian X does not work
    ... They suggested the SSH X forwarding to me. ... The remote x display works between Solaris systems, it also works between debian systems. ... accept local connections unless explicitly configured to do otherwise). ...
    (SSH)
  • X11 stuff stopped working after upgrade from SSH2.4.0 to SSH3.2.2
    ... X11 stuff isn't working. ... Client is not authorized to connect to Server ... Cannot open display ":0.0". ... X11 forwarding disabled. ...
    (comp.security.ssh)