Tips – TricksXubuntu

Fixing Error in locking authority file .Xauthority

I installed xfce4 package to xubuntu by mistake (having multiple terminals plus virtualbox, i was installing/working debian machine on virtualbox but thought a terminal on my screen is virtualbox windows), after a reboot i can’t login to my machine. I got stuck at the login screen, it does give an error after login but pop back to login screen real fast so i could not read the errror.

To read the error, you need to reboot the machine, while the machine is rebooting, hold “Shift” key until you see grup (GNU GRand Unified Bootloader) menu. Choose root/terminal.

Note**: you can also use “Ctrl” + “Alt” + “F3″ at the login screen to login into the shell.

You will have a terminal with root user, you want to switch to the user which you having problem login with

# su user

Then run startx

$ startx

Now you will be able to read the error, in my case i got

x: user not authorized to run the X server, aborting.
xinit: giving up
xinit: unable to connect to X server: No such file or directory
xinit: server error
xauth: error in locking authority file /home/user/.Xauthority

The error i got means i do not have authorize to access $HOME/.Xauthority file in my user directory.

If you have the same problem, simply run chown as root to change the ownership back to the user. At the terminal as root, go to /home/user

# cd /home/user

list all files with ownership

# ls -a -lh

change file/files ownership to your user

# chown user:user .Xau*

reboot the machine, everything should be working as normal now.

Related Articles

Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments
Back to top button