12

Recently, I switched from Ubuntu to Arch Linux. I've installed X11 as my Window System and KDE as my Desktop Environment. I've separate partition for /home, /var, / and /boot and they all mount at boot time. When I run startx, the following message gets displayed.

xauth:timeout in locking authority file /home/hello/.Xauthority

Accidently, I've deleted that file. So, I copied it from /root. I've changed it's authority using code below:

# chown hello:users ~/.Xauthority

Even after this, I'm unable to run startx unless I use root account.

2
  • Copying the file is a security risk. You changed its permissions (ownership), not its authority. Commented Nov 20, 2013 at 13:37
  • (Re)move ~/.Xauthority and try startx again. Does it work? If not, what is the exact error message? Commented Nov 20, 2013 at 13:37

3 Answers 3

12

First a clarification, X is not a window manager, it is a windowing system.

Now, the ~/.Xauthority file is simply where the identification credentials for the current user's Xsession are stored, it is the file read when the system needs to determine if you have the right to use the current X session.

You should never copy an existing one from another account, the file should always belong to the user running X and is created automatically when you start a new X session. So, just delete the one you have, and then run startx again, everything should work as normal:

$ rm ~/.Xauthority; startx 
4
  • Tredon, even after removing .Xauthority file. I am unable to starx. It keeps on displaying that same error. Commented Nov 20, 2013 at 13:51
  • @Habi you need to make sure there are no running X sessions, then remove the file, then run startx again. Commented Nov 20, 2013 at 13:57
  • Now, X runs but displays another message Call to Inusertemp failed(temporary directories full?). Check your installation. Commented Nov 20, 2013 at 13:57
  • @Habi ah, good, that's progress :). Please post another question for this since it is a completely different problem. In the new question, show us the output of df -h and also make sure this problem is still there after restarting. Commented Nov 20, 2013 at 14:01
5

I think an issue is that people login as root, then switch users using su -l username, which creates/spawns a subprocess under root owned by "username". X will use the .Xauthority of the top process (in this case root), which "username" does not have permission to use.

The error will be shown:

Cannot open virtual console 1 (Permission denied). 

To solve this, just run login instead of su to start a new shell as a top process.

0

I encountered this on a Lenovo IdeaPad with two graphic cards, one from Intel the other from Nvidia.

The error resulting from startx included this line:

addscreen/screeninit failed for driver 0 kde plasma

This was the solution:

  1. Change /etc/mkinitcpio.conf by adding MODULES=(nouveau)
  2. sudo mkinitcpio -p linux
  3. reboot

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.