xauth fails to create .xauthority file and throws error, .xauthority does not exist if either the disk is full and there is no more space to create any new file or user quota exceeded the limits.

Suppose you run xauth command and got this error –

[email protected] ~ $ xauth
xauth:  file /home/ironman/.Xauthority does not exist
Using authority file /home/ironman/.Xauthority

It shows that file .Xauthority does not exist. To create .Xauthority file, follow these steps –

Step 1: Login with the required user and go to home directory.

Step 2: Rename and backup the existing .Xauthority file.

mv .Xauthority old.Xauthority 

Step 3: Touch otherwise xauth with complain unless ~/.Xauthority exists

touch ~/.Xauthority

Step 4: Only this one key is needed for X11 over SSH

xauth generate :0 . trusted

Step 5: Generate our own key, xauth requires 128 bit hex encoding

xauth add ${HOST}:0 . $(xxd -l 16 -p /dev/urandom)

Step 6: To view a listing of the .Xauthority file

xauth list

Also, you should check for the disk space. If it is full then remove some files and make space otherwise system won’t be able to create new files. To check space, use this command –

df -h

If you get the below error then it means the number of files quota exceeded for your user. It’s time to free up space.

$ touch ~/.Xauthority
touch: cannot touch ‘/nethome/jdoe/.Xauthority’: Disk quota exceeded

These solutions will definitely solve your problems of .xauthority does not exist.


About the Author


I am Akash Mittal, an overall computer scientist. If you want to guest post, need help in your projects, want to advertise, Feel free to contact me at [email protected]

View All Articles