How to fix: timeout in locking authority file /home//.Xauthority (2018)

If you are reading this, then the chance is big that you are getting the “timeout in locking authority file /home/<user>/.Xauthority” error. Below we have written out how you can solve this issue.

But before you start, did you try the following command?

strace xauth list

The command above will show what is the problem of xauth starting correctly. Make sure to read the log and google on the items.

Lets start with the first one. We are going to check if there are locked .Xauthority files in the /home/<user>/ folder.



cd /home/<user>
ls -l | grep .Xauth*

If it is correct, you should not see any locked .Xauthority files, if you do see them, you can perform the following command in the /home/<user>/ folder:

rm -fr .Xauthority-*

Once you have performed the above, reset the SSH connection, and check if you get the same error.