Secure Shell
wrong DISPLAY variable Dec 07 2010 06:33PM
Asif Iqbal (vadud3 gmail com) (1 replies)
iqbala@jp2 { ~ }$ ssh -Y hlr-brixuat-01.example.net.
Password:
Last login: Tue Dec 7 17:33:46 2010 from jp2.example.net
[iqbala@hlr-brixuat-01 ~]$ xterm
_X11TransSocketINETConnect() can't get address for hostname:6000: Name
or service not known
xterm Xt error: Can't open display: hostname:0.0

[iqbala@hlr-brixuat-01 ~]$ echo $DISPLAY
hostname:0.0

[iqbala@hlr-brixuat-01 ~]$ env | grep DISPLAY
DISPLAY=hostname:0.0

[iqbala@hlr-brixuat-01 ~]$ DISPLAY=:0.0 xterm
xterm Xt error: Can't open display: :0.0

so DISPLAY id is wrong.

[iqbala@hlr-brixuat-01 ~]$ xauth list $DISPLAY
xauth: (argv):1: bad display name "hostname:0.0" in "list" command

so I run xauth list to guess the correct DISPLAY id

[iqbala@hlr-brixuat-01 ~]$ xauth list
hlr-brixuat-01.ip.qwest.net/unix:10 MIT-MAGIC-COOKIE-1
6e28736cb0f1227240fb9cd0ee304ca8
hlr-brixuat-01.ip.qwest.net/unix:12 MIT-MAGIC-COOKIE-1
f67286cba96bf92053290c367af9c1c3
hlr-brixuat-01.ip.qwest.net/unix:11 MIT-MAGIC-COOKIE-1
6687e7e136b618bbddca53ee7a10cba7
hlr-brixuat-01.ip.qwest.net/unix:13 MIT-MAGIC-COOKIE-1
b8821e6e537c7c9803342f7aa04cea76

so lets pick DISPLAY id as 12.0

[iqbala@hlr-brixuat-01 ~]$ DISPLAY=:12.0 xterm
X connection to localhost:12.0 broken (explicit kill or server shutdown).

looks like I picked the wrong DISPLAY id. lets pick the next one, which is 13.0

[iqbala@hlr-brixuat-01 ~]$ DISPLAY=:13.0 xterm

Yes! this time it worked.

Why do I have to pick a DISPLAY id? shouldn't xterm pick the correct
DISPLAY id already?

I am running OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008 on
Red Hat Enterprise Linux Server release 5.5 (Tikanga)

Any suggestion on fix is appreciated.

--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

[ reply ]
Re: wrong DISPLAY variable Dec 07 2010 08:55PM
Darren Tucker (dtucker zip com au) (1 replies)
Re: wrong DISPLAY variable Dec 07 2010 10:34PM
Asif Iqbal (vadud3 gmail com)


 

Privacy Statement
Copyright 2010, SecurityFocus