Just to report, I did have a similar problem. But in my case i just follow those steps:
Follow these steps to create a $HOME/.Xauthority
file.
Log in as user and confirm that you are in the user's home directory.
# Rename the existing .Xauthority file by running the following command mv .Xauthority old.Xauthority # xauth with complain unless ~/.Xauthority exists touch ~/.Xauthority # only this one key is needed for X11 over SSH xauth generate :0 . trusted # generate our own key, xauth requires 128 bit hex encoding xauth add $:0 . $(xxd -l 16 -p /dev/urandom) # To view a listing of the .Xauthority file, enter the following xauth list
After that no more problems with .Xautority
file since then.
Thanks and credits to srinivasan.