I have a MythTV box running Debian Sarge. Last night I had to reboot
it, which has never caused a problem before, but now the "mythtv" user
cannot authenticate with X and get access to display :0.0. I am using
kdm and it usually logs the mythtv user in automatically when the X
server starts, but now I get a bunch of these errors in /var/log/kdm.log:
AUDIT: Tue Mar 6 22:36:07 2007: 2830 X: client 1 rejected from local
host
Auth name: MIT-MAGIC-COOKIE-1 ID: -1
AUDIT: Tue Mar 6 22:36:07 2007: 2830 X: client 2 rejected from local
host
Auth name: MIT-MAGIC-COOKIE-1 ID: -1
I have Googled this problem and found several posts that said to
delete the user's .Xauthority file, but this did not work. The next
time I try to log in as "mythtv", it recreates the file but it is
empty. I have also tried using xauth to generate a new file, but it
does not work:
$ xauth generate :0 .
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
xauth: (argv):1: unable to open display ":0".
Trying this as root gets the same error. My regular user account on
the box is able to log in and use X just fine, so I tried copying my
.Xauthority file to the mythtv user's home directory, but this did not
work.