xauth: problems with ssh -X and .Xauthority on nfs

NoOp glgxg at sbcglobal.net
Wed Jul 9 16:50:09 UTC 2008


On 07/09/2008 01:35 AM, Vincent Arkesteijn wrote:
> Package: xauth
> Version: 1:1.0.2-2
> Severity: normal
> 
> Hi,
> 
> After upgrading from Ubuntu 7.10 to 8.04, sometimes (see below for 
> an explanation of the circumstances under which this happens) I cannot 
> start new X applications. For instance:
> $ xlogo
> No protocol specified
> Error: Can't open display: :0.0
> $ 
> 
> At the same time, /var/log/Xorg.0.log shows lines like the following:
> AUDIT: Mon Jun  9 12:51:39 2008: 6255 X: client 34 rejected from local host (ui$
> 
> This only seems to happen after I log in to a remote host (using "ssh
> -X somehost"). After that, only starting programs locally is a
> problem; starting X programs from the remote host works fine. This does
> not always trigger the problem, but roughly half the time. It does not
> seem to make a difference whether I log in to an Ubuntu 7.10 or 8.04
> machine. On the remote host, I have the same account, with a shared
> (via nfs) home directory. Ths nfs server runs Ubuntu 7.10.
> 
> Logging out from the remote machine does not help. What does help,
> however, is typing "xauth list" or just "cat ~/.Xauthority" in a local
> terminal window. After that, I can again start new applications.
> 
> Also, just 'cat ~/.Xauthority' appear to help. Before that, sometimes I
> even get:
> $ ls -l .Xauthority 
> ls: cannot access .Xauthority: Stale NFS file handle
> $ 

I'm not sure if my 'fix' is a security issue, or even will 'fix' your
issue, but I've found that changing the ownership of .Xauthority to user
instead of root resolves these problems for me:

sudo chown username:usergroup .Xauthority





More information about the ubuntu-users mailing list