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

Re: X Authentication Problem




Andrew Sackville-West wrote:
On Wed, Mar 07, 2007 at 01:40:28PM -0500, David A. Parker wrote:
Kent West wrote:
David A. Parker wrote:
X: user not authorized to run the X server, aborting.
giving up.
xinit: No such file or directory (errno 2): unable to connect to X server
xinit:  No such process (errno 3):  Server error.
Couldnt get a file descriptor referring to the console

I have tried it both with and without the "DISPLAY=:0.0" at the beginning. Also, "startx" works as root.
I think at this point I'd rename mythtv's home directory and create a new blank one (make sure to get the perms correct on the directory), and try starting X then to see what happens.

Hmmm...

As root:

# mv mythtv mythtv.BAK
# mkdir mythtv
# chown mythtv:mythtv mythtv
# chmod 0755 mythtv
# su - mythtv

Then as "mythtv":

$ ls -la
total 8
drwxr-xr-x  2 mythtv mythtv 4096 Mar  7 12:55 .
drwxrwsr-x  5 root   staff  4096 Mar  7 12:55 ..
$ startx
xauth:  creating new authority file /home/mythtv/.Xauthority
xauth:  creating new authority file /home/mythtv/.Xauthority
Using authority file /home/mythtv/.Xauthority
Writing authority file /home/mythtv/.Xauthority
Using authority file /home/mythtv/.Xauthority
Writing authority file /home/mythtv/.Xauthority
X: user not authorized to run the X server, aborting.
xinit:  Server error.
Couldnt get a file descriptor referring to the console

I tried this a couple of times and it consistently failed.  The new
/home/mythtv/.Xauthority file it created was empty.  I also tried using
xauth and mcookie to add new cookies, but it still didn't work:

mythtv@lipton:~$ startx
X: user not authorized to run the X server, aborting.
xinit:  Server error.
Couldnt get a file descriptor referring to the console

sorry, shoul dhave provided mine for reference

andrew@basement:~$ ls -l / | grep tmp
drwxrwxrwt  10 root root  5.0K 2007-03-07 10:47 tmp


Sorry I did not get a chance to continue this yesterday, but thanks for all of the suggestions. I found the cause of the problem late last night, but I still can't explain it.

The cause appears to be the contents of the ~/.xsession file. I noticed that I was able to log in to kdm as another regular user, and the only difference between the two accounts was that "mythtv" had a .xsession file and the other user did not. When I copied mythtv's .xsession to the other user's home directory, that account experienced the same problems. The ~/.xsession file for "mythtv" contained two lines:

fvwm &
DISPLAY=:0.0 fvwm-root /home/mythtv/mythtv_startup.png &

The first line starts the fvwm window manager, and the second line replaces the background image with a fullscreen MythTV logo. I tried removing the second line, but that did not solve the problem. Then I removed the "&" from the fvwm line and it worked.

The apparent cause of all of this was the fact that the window manager was being started in the background. It's not just fvwm, because I tried "twm &" and that failed as well, but just "twm" worked fine. The really strange thing is that this .xsession file hasn't been changed in quite some time, and this never caused a problem before.

Thanks to everyone for your advice and suggestions. Does anyone have any ideas about how to make this behave like it used to?

    Thanks!
    Dave

--

Dave Parker
Utica College Department of
Integrated Information Technology Services
Data Processing Office
(315) 792-3229
Registered Linux User #408177



Reply to: