When it complains about "xauth: error in locking authority file .Xauthority"
First check who owns this file, root or the user?
Second, xauth -b quit will break any locks. (If your problem has similar causes as mine did, there will be an .Xauthority, and a couple of others–.Xauthority-c and .Xauthority-l, if I remember correctly.)
Leave a comment