[Gllug] automagic DISPLAYs
Alex Hudson
home at alexhudson.com
Tue Sep 18 12:41:30 UTC 2001
On Tuesday 18 September 2001 12:32, you wrote:
> > 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)
Yep, but you only need to s/\/dev\///; the output of tty.
> > 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
Authentication problem. You could install xauth, or you could xhost + on the
server machine if it's not too strict. I don't think the tunnel does anything
particularly magic.
> 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)
I think that's going to be your main problem then - ssh tunnelling is
probably the answer, since that is the only tool which will propogate the
local information. Certainly, it works well for me. xauth is going to require
a lot of libraries though. You could make a static one, or you could use scp
to copy around the authority file. This would be icky, but wouldn't require a
remote xauth (you need that to do things like merging easily, but it's not
definitely required IIRC). Another way is to write your own xauth for each
local machine - not necessarily easy, but doable. The remote xauth will be
run 'xauth -q -', and ssh enters a chat with it, starting with something like
'add remotehost:1'. Or you could rsh/ssh an xauth session on another
machine, and do it that way (similar to copying the Xauthority around).
Cheers,
Alex.
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list