[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: xauth problem



Remco Blaakmeer wrote:

> On Thu, 15 Jan 1998, Jens B. Jorgensen wrote:
>
> > Miquel van Smoorenburg wrote:
> >
> > > In article <[🔎] m0xsqic-0007zaC@westgac3.dragon.com>,
> > >  <tko@westgac3.dragon.com> wrote:
> > > >I've chased this one for a while. Martin Bialasinski tried to help via private
> > > >email, but neither of us could figure out what is wrong.
> > >
> > > >open("~/.Xauthority", O_RDONLY)         = -1 ENOENT (No such file or directory)
> > > >access("~/.Xauthority", F_OK)           = -1 ENOENT (No such file or directory)
> > >
> > > The kernel does not know about "~/" as an abbreviation of the homedirectory,
> > > that's why it fails. I think you have set some environment variable which
> > > xauth uses to "~/" or similar instead of the full path to your homedirectory.
> > > Check out the output of "set" and/or "printenv" to find out which variable.
> > >
> >
> > To be more specific, it is the shell (bash, csh, whatever) which expands '~' into
> > the path for your home directory. You probably put this in your .bash_profile:
> >
> > XAUTHORITY="~/.Xauthority"
>
> The solution is, of course:
>
> XAUTHORITY="${HOME}/.Xauthority"
> (AFAIK, $HOME is already set when /etc/profile is run)
>
> But this is the default location. I think it is better to not set the
> variable at all if you don't have a good reason to set it.

Ah, but in the situation I described, you want to point to the logged-in user's
Xauthority, not roots, so using your command above will not work since once you su HOME
will be root's home directory. Also as you point out you don't need to set it. I believe
xdm provides it. Also, you must make sure to 'export' the variable.

--
Jens B. Jorgensen
jjorgens@bdsinc.com



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: