Sometimes, xauth complains with:
Using authority file /home/mmokrejs/.Xauthority
xauth> source /home/mmokrejs/.Xauthority
xauth: /home/mmokrejs/.Xauthority:2: line too long
It does not show which lines is that, "xauth list" seems to work normally so one wonders what is really wrong. Please improve the error message to show at least the beginning of the problematic line ... whatever. See the bug at Gentoo for more details and the problematic .Xauthority file. At the very moment is seems the file is fine, so maybe it was an issue with xauth binary and not the file itself? Who knows. Googling around gives some hits to some similar cases. Would be nice if it would say what was too long on the line. The cookie? The hostname part?
.Xauthority is a binary file - it doesn't really have lines to show, and
dumping them to your screen would just break your terminal.
The "source" command requires a text file containing xauth commands - an
.Xauthority file is not at all usable for source, and no amount of dumping
binary data to your terminal will help you fix that.
So how can I import the old .Xauthority-old file?
Hmm, "xauth -f .Xauthority-old".
Could "xauth source" give an error message if the file is a binary? I know that you will probably disagree based on which chars should it detect the "binary" but it is up to you. ;-)