X11 weirdness
From Peter Pap's Technowiki
This page lists a number of X11 errors, what they mean and how to fix them.
X11 connection rejected because of wrong authentication.
Scenario: You ssh to a server with -X or -Y flag to allow X11 forwarding. When you fire up your X11 app on the server it does with:
X11 connection rejected because of wrong authentication.
The reason for this is the there is an issue with the .Xauthority file in your home directory on the server. Check that you have rights to read and right to the file. If all else fails, delete it and try again.
If you are trying to run the X11 app as root, ie. sudo X11_app, then you could try copying your .Xauthority file to the root users home directory
sudo cp /home/ppapa/.Xauthority /.Xauthority