Monday, September 12, 2016

xauth: file /home/oracle/.Xauthority does not exist

Another issue with xauth. :(

But good thing that I have got the solution.

Logged in as oracle buy xclock is not working

[oracle@o12c sf_vshare]$ xclock
SSH gateway: X11 authentication failed. Error: Can't open display: localhost:11.0
[oracle@o12c sf_vshare]$ echo $DISPLAY
localhost:11.0
[oracle@o12c sf_vshare]$ DISPLAY=localhost:10.0
[oracle@o12c sf_vshare]$ echo $DISPLAY
localhost:10.0
[oracle@o12c sf_vshare]$ xclock
SSH gateway: X11 authentication failed. Error: Can't open display: localhost:10.0
[oracle@o12c sf_vshare]$
[oracle@o12c sf_vshare]$ xauth list
xauth:  file /home/oracle/.Xauthority does not exist
[oracle@o12c sf_vshare]$
But it is working as root. let's see what are the values of display and xauth there

[root@o12c ~]# echo $DISPLAY
localhost:10.0
[root@o12c ~]#
[root@o12c ~]#
[root@o12c ~]# xauth list
o12c.localdomain/unix:12  MIT-MAGIC-COOKIE-1  fc6f5640fe846f9825cb0e121a303517
o12c.localdomain/unix:10  MIT-MAGIC-COOKIE-1  0a9f61e7313ebd9919b03dabe07f9697
o12c.localdomain/unix:11  MIT-MAGIC-COOKIE-1  d34c3a647ff47405f452c4910e7d9a39
[root@o12c ~]#

Now log back to oracle and set the following

[oracle@o12c ~]$ xauth add o12c.localdomain/unix:10  MIT-MAGIC-COOKIE-1  0a9f61e7313ebd9919b03dabe07f9697
xauth:  file /home/oracle/.Xauthority does not exist
[oracle@o12c ~]$ ls -lah /home/oracle/.Xauthority
-rw-------. 1 oracle oinstall 62 Sep 12 14:58 /home/oracle/.Xauthority
[oracle@o12c ~]$
[oracle@o12c ~]$
[oracle@o12c ~]$ xauth list
o12c.localdomain/unix:10  MIT-MAGIC-COOKIE-1  0a9f61e7313ebd9919b03dabe07f9697
[oracle@o12c ~]$
[oracle@o12c ~]$ xclock
SSH gateway: X11 authentication failed. Error: Can't open display: localhost:11.0
[oracle@o12c ~]$ DISPLAY=localhost:10.0
[oracle@o12c ~]$ xclock
Warning: Missing charsets in String to FontSet conversion
[oracle@o12c ~]$
So moral of story. match the number after : under xauth list with the DISPLAY variable plus run xauth add with values from the session where it is working for :10.0 and it should work.




No comments: