Trouble in accessing `/home/USERNAME/.Xauthority'

NoOp glgxg at sbcglobal.net
Wed Mar 17 22:56:22 UTC 2010


On 03/17/2010 03:05 PM, Hamed Abdy wrote:

Note: please bottom post on this list - thanks :-)

> To NoOp:
> 
> "$ locate .Xauthority" does nothing.
> $ ls -l ~/.Xauthority
> ls: cannot access /home/hamed/.Xauthority: No such file or directory
> $ ls -l /root/.Xauthority
> ls: cannot access /root/.Xauthority: Permission denied

And that is the crux of the problem - you have no
/home/hamed/.Xauthority - the file is missing. So that is what needs to
be addressed first.

BTW: I just installed the package on Ubuntu 9.10 w/o issue following the
instuctions on the site. Note that I _do_ have an ~/.Xauthority file and
had one before I installed the package:

karmic at karmic:~$ locate .Xauthority
/home/karmic/.Xauthority
/home/karmic/tempdir/.Xauthority
karmic at karmic:~$ ls -l .Xauthority
-rw------- 1 karmic root 52 2010-02-08 11:52 .Xauthority

Note that the above was previously karmic:karmic & the
sudo chown USERNAME.root ~/.Xauthority
(sudo chown karmic.root ~/.Xauthority)
changed the permissions as expected.

I also forgot that you need to do the following to check your
/root/.Xauthority file:

karmic at karmic:~$ sudo su
[sudo] password for karmic:
root at karmic:/home/karmic# cd /root
root at karmic:~# ls -l .Xauthority
lrwxrwxrwx 1 root root 24 2010-03-17 15:29 .Xauthority ->
/home/karmic/.Xauthority
root at karmic:~# exit
exit

And you can see from here that the package is installed:

karmic at karmic:~$ apt-cache policy linux-firewall.org
linux-firewall.org:
  Installed: 2.7
  Candidate: 2.7
  Version table:
 *** 2.7 0
        100 /var/lib/dpkg/status
karmic at karmic:~$

The above was installed on a "vanilla" karmic 9.10 test machine. I've
not tried any of the "firewall" features as yet.

So, now the missing ~/.Xauthority; no idea why this is/was missing on
your system. To see if ~/.Xauthority regenerates if missing, I renamed
the file on my test system to ~/x-.Xauthority-x and rebooted (remember
this is a test machine, so it doesn't matter if I screw it up).
Following the reboot I checked and no new ~/.Xauthority was generated.
So, we now have to figure out where the file originates from, and how to
restore yours.





More information about the ubuntu-users mailing list