[Gllug] automagic DISPLAYs

Simon Trimmer simon at urbanmyth.org
Tue Sep 18 11:32:34 UTC 2001


On Tue, 18 Sep 2001, Alex Hudson wrote:
> On Tuesday 18 September 2001 11:33, you wrote:
> > I want to get the DISPLAY environment variable set to the hostname from
> > which I logged in from, anyone think of a reliable method?
>
> grep who for the 'FROM' parameter, I suppose. Depends - do you want to be
> able to get name 'A' when logged into 'C' via 'B'?

just the simple client-server case, with who you'd need to match with the tty
name (multiple logins from different machines to the same username)


> > Don't suggest ssh X redirection, machines have no X libraries :)
>
> My ssh isn't linked with X - I thought it just tunneled a standard
> connection?

on login you get "sh: /usr/X11R6/bin/xauth: No such file or directory"
and the tunnel doesn't work


> I suppose it depends how it sets up the connection - it could
> always ldload - I've never had ssh on a machine without X.

I find it amusing that the kernel's xconfig works without the X libraries

a nasty hack that works (just for ssh) is;
export DISPLAY=`echo $SSH_CLIENT | cut -d " " -f 1`:0.0

which assumes I'm only running one X display (not a good assumption with me)

-Simon
Simon Trimmer <simon at urbanmyth.org>


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list