X11UseLocalhost option and the DISPLAY variable

Ed Phillips ed at UDel.Edu
Fri Apr 12 07:19:38 EST 2002


On Thu, 11 Apr 2002, Kevin Steves wrote:

> Date: Thu, 11 Apr 2002 11:29:20 -0700 (PDT)
> From: Kevin Steves <kevin at atomicgears.com>
> To: Ed Phillips <ed at UDel.Edu>
> Cc: Kevin Steves <kevin at atomicgears.com>,
>      OpenSSH Development <openssh-unix-dev at mindrot.org>
> Subject: Re: X11UseLocalhost option and the DISPLAY variable
>
> On Thu, 11 Apr 2002, Ed Phillips wrote:
> :No, I don't think so, but it doesn't solve my problem either.  The "old
> :client" I'm using is a "current" version of Tivoli's Maestro (gconman in
> :particular).  I don't know what X calls they use to deal with the display,
> :but the application is certainly linked against the current Solaris 8 X
> :libraries - just like xterm, xclock, etc.,... which work fine with DISPLAY
> := "localhost:16.0".
> :
> :So, if anyone can explain to me why "127.0.0.1:16.0" works and
> :"localhost:16.0" does not (in an OpenSSH 3.1p1 X11-forwarding scenario),
> :or how we could add an option (or why we wouldn't want to add an option)
> :to have OpenSSH to use the IP address in the DISPLAY variable, I'd
> :appreciate it.
>
> We talked about dials for various display settings, but kept it simple at
> first.  Is that a client I can obtain and try here?  Is it definately
> using the same Xlib, etc. as the other clients that work?

The more I look at the executable, the more it appears that to have some
sort of Xlib routines compiled-in (whew... it's almost 8MB!).  According
to "nm", there are a bunch of FUNC entries like XOpenDisplay,
XMoveResizeWindow, etc., that are GLOB (not UNDEF).  I must have been
looking the wrong line in my "ldd" output for the help viewer (a separate
X app) because it's the only executable that actually links libX11.so (or
any other X library).  Drat!

> Is the resolver used the same?

There are UNDEF calls to gethostbyname, etc., so I assume that will just
call the libc.so stubs that get mapped to whatever is setup in
/etc/nsswitch.conf (in my case, "files dns").  If it was a resolver
problem, then it would probably be reproduceable in some other app.

Most likely, it's a problem with XOpenDisplay() in the compiled-in X
libraries. Double-drat!

So, would it be worth it to add a "X11UseLocalhost ip" option to make sshd
set DISPLAY using the IP address or make "X11UseLocalhost yes" actually
set the DISPLAY to "127.0.0.1:10.0" or similar?  Would this break
non-"older" X apps in any way or cause DNS lookups to be performed too
infrequently for peoples' tastes?

Thanks,

	Ed

Ed Phillips <ed at udel.edu> University of Delaware (302) 831-6082
Systems Programmer III, Network and Systems Services
finger -l ed at polycut.nss.udel.edu for PGP public key




More information about the openssh-unix-dev mailing list