Subject: Re: more xauth problems,
To: None <kenn@pcintelligent.com, port-sparc@netbsd.org>
From: Ben Harris <bjh21@netbsd.org>
List: port-sparc
Date: 02/16/2001 14:04:20
In article <Pine.LNX.4.21.0102151722300.8863-100000@web.pcintelligent.com> you write:
>Hi there,
>
>	OK, At this point I am so whinning about this. I have been beating
>this thing to death. Here is my set up, 
>
>sparc1 192.168.1.2
>netbsd 192.168.1.6
>
>	On the sparc I did 'xauth add sparc:0 . trusted' and 'xauth add :0
>. trusted'  Ont the netbsd box I did the same thing replacing sparc1 with
>netbsd, OK, this seems fine.... I then ftped over .Xauthority from the
>sparc to the netbsd box which is where I wanna use the dislpay, (the
>machine the monitor is plugged into) Anyway I called the file Xauth. I
>then ran this command
>	xauth merge "filename" Nothing seemed to have gone wrong. I still
>however can't connect. Ugh... Anyway, if you have any advice that would be
>great. I know I have brought htis up before but I still am not getting
>anywhere with it.

Do you actually understand how X authorisation works?  What are you trying
to achieve?

As far as I can see, you've got one display (netbsd:0), and want clients
running under your account on both netbsd and sparc1 to be able to display
on it.  To make this work, the easiest thing to do is to use SSH with X
forwarding:

netbsd:$ ssh -X -f sparc1 xlogo

This automatically handles the authorisation for you, and runs the X
protocol over an encrypted tunnel and is generally good unless you're
particularly short of CPU.

If you're short of CPU, then you might want to run X without encryption, in
which case you need to start mucking around with xauth.  The usual magic I'd
use goes something like this:

netbsd:$ xauth extract - netbsd:0 | ssh sparc1 xauth merge -

This extracts netbsd's authorisation to use its own display from your
.Xauthority file and sends it over the network to sparc1, which merges it
into your .Xauthority file there.

-- 
Ben Harris                                                   <bjh21@netbsd.org>
Portmaster, NetBSD/arm26               <URL:http://www.netbsd.org/Ports/arm26/>