oracle@myserver:[testdb01]# xclock X11 connection rejected because of wrong authentication. Error: Can't open display: localhost:10.0
The DISPLAY variable was set to localhost:10.0.
The solution was to logon as root and execute
root@myserver~]# xauth list $DISPLAYThe result from this was
myserver.mydomain.com/unix:10 MIT-MAGIC-COOKIE-1 83f9f76d03106db6fc0880edfb005607Then change user back to oracle and add the cookie to oracle's authorization file:
[root@myserver ~]# su - oracle oracle@myserver:[testdb01]# xauth add :10 MIT-MAGIC-COOKIE-1 83f9f76d03106db6fc0880edfb005607If you get the error:
xauth: file /home/oracle/.Xauthority does not existcreate the file first:
touch /home/oracle/.XauthorityThen retry the "xauth add" command above.
Verify with:
oracle@myserver:[testdb01]# xauth list $DISPLAY myserver.mydomain.com/unix:10 MIT-MAGIC-COOKIE-1 83f9f76d03106db6fc0880edfb005607 oracle@myserver:[testdb01]# echo $DISPLAY localhost:10.0I could now execute X Applications:
oracle@myserver:[testdb01]# xclock