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

Re: xauth problem

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:


Putting the '~' within quotes keeps the shell from performing the expansion. As a
pure example try the following commands:

echo ~
echo "~"
echo \~

Here's a tip for you though: if you are trying to create the .Xauthority so you can
run things from X when you logged in as your regular user there's a better (easier)
way. Let's say that I logged into xdm on my workstation as the user "myself". Now I
need to do a few administration things so I have to su to root. After I 'su' I just

export XAUTHORITY=~myself/.Xauthority

And off I go. Note that this works because although the perms on an Xauthority file
are always set to 0600, root can read *any* file.

Jens B. Jorgensen

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: