[NCLUG] X, xhost, xauth, stuff like that...

S. Luke Jones luke at frii.com
Thu Sep 13 22:00:16 MDT 2001


I've been reading the X* howtos and frankly I'm still confused.  Can some
one (or all of you) who actually understand this stuff check me on this?

I'm sitting in front of a machine, call it A.  If I understand the
terminology, I'm running an X server and some number of X clients (xterm,
Netscape, ...) on machine A.  If I look at my $DISPLAY variable it's
':0.0' meaning the local host display 0 screen 0. So far, so good.

Now, I have another machine B that has a crappy monitor and is in an
inconvenient place but nonetheless has a lot to recommend it, e.g., it
has a dialout connection -- and, yes, I could use IP masquerading but
let's ignore that because I'm talking about X here. Okay, scratch the
dialout. Say it has a faster CPU (in fact, two CPU's, both of them faster)
and twice as much RAM.  I'd like to, uh, encode some MP3's and, um, I want
to use a spiffy graphical MP3 encoding application ("X client", yes?) from
this machine A with the nice monitor on that machine B with the big iron.

So I open an xterm here on A and ssh over to B.

	luke at A $ ssh B
	luke at B $ gmp3enc foo.wav
	Gtk-WARNING **: cannot open display:

OK. Now I need to tell the MP3 encoding client that my actual X server is
over here.

	luke at B $ export DISPLAY=':0.0'
	Gtk-WARNING **: cannot open display: :0.0

Oops. That's not here, that's there.

	luke at B $ export DISPLAY='A:0.0'
	Gtk-WARNING **: cannot open display: A:0.0

Sigh. Assuming that 'A' is resolving correctly -- and at least for "ping"
it is, not because I understand DNS but because it really isn't that big
a hassle to maintain two 2-line /etc/hosts files :-) -- then is it fair
to say that the reason for this most recent error is because the X server
here on A is rejecting the overtures of B?

Assuming this is true, then I gather what I really don't want to do is
via "xhost +B" over here on A, because that's a really lame 80's kind of
insecure solution. Which is fine with me because it doesn't work anyway,
at least when I did it:

	luke at A $ xhost +B
	B being added to access control list
	luke at A $ ssh B
	luke at B $ gmp3enc foo.wav
	Gtk-WARNING **: cannot open display: A:0.0

So that leaves me with xauth, and maybe it's just because it's late and
I'm tired, but I can't make heads or tails of that. The man page, is
IMHO, impenetrable. I don't even use XDM (or GDM or KDM or whatever). I
just do an old fashioned startx from, yes -- I'm not afraid to say it
-- the command line. On the other hand, the kind folks at Red Hat have
apparently done something with it because I have a .xauth directory
hierarchy in my $HOME.

Sigh and double-sigh. Bother. Can anyone recommend a HOWTO or other
material that spells this out in one-syllable words for an old duffer
like me?

-- 
Luke Jones = luke/vortex/frii/fullstop/com



More information about the NCLUG mailing list