Subject: Re: (Off-topic) How to share a .Xauthority file?
To: #List NetBSD current users <current-users@netbsd.org>
From: Paul Goyette <paul@whooppee.com>
List: current-users
Date: 07/04/1999 18:32:02
On Sun, 4 Jul 1999, Paul Goyette wrote:

> On Sun, 4 Jul 1999, Gandhi woulda smacked you wrote:
> 
> > There should be a way to define -- for X -- an authority file, and depending
> > upon what you're using to start your session, you either have to configure
> > it in the xdm/Xservers file or in your .login/.profile file.
> 
> Yep, there's a -auth argument to the server.  But that doesn't specify
> where to put the user's .Xauthority file, but rather it tells the server
> where to get the information that xdm is passing down.  You can even set
> this with an xdm resource,  but it doesn't help me much.  :(

Actually, I firgured out a work-around:

In my .xsession file, I simply copy the current .Xauthority file to
.Xauthority-`hostname` and then set environment variable XAUTHORITY
pointing to the copy.

Checking the source, there's just no way to make xdm put the file
anywhere other than the default place, unless it fails to access the
lock for the file.  There is no resource or anything else used to
determine the user's .Xauthority file name.  I guess they never
expected people to log in on multiple machines simultaneously!  :)

--------------------------------------------------------------------------
| Paul Goyette      | PGP DSS Key fingerprint:   | E-mail addresses:     |
| Network Engineer  |   BCD7 5301 9513 58A6 0DBC |  paul@whooppee.com    |
| and kernel hacker |   91EB ADB1 A280 3B79 9221 |  pgoyette@juniper.net |
--------------------------------------------------------------------------