restoring .Xauthority file

When ~/.Xauthority file is broken, one may see this error.

$ xhost
Xlib: connection to ":27.0" refused by server
Xlib: No protocol specified

xhost:  unable to open display ":27.0"

To resurrect ~/.Xauthority on SunRay GNOME desktop, one can do...

$ ps -fu $LOGNAME | grep auth
myloginid 38135  4992   0   Feb 15 ?         634:12 /opt/SUNWut/lib/Xnewt :27 -nobanner -auth /var/dt/A:27-czaaCc +bs -kb
myloginid 19364 44532   0 13:03:24 pts/65      0:00 grep auth
$ xauth -if /var/dt/A:27-czaaCc list
#ffff##:  MIT-MAGIC-COOKIE-1  9acd879ea2a098959a9183988ebc91a2
$ xauth add $(hostname)/unix:27 MIT-MAGIC-COOKIE-1  9acd879ea2a098959a9183988ebc91a2

This was not possible on RedHat Linux gdm because authority file is owned by root and is not world readable.
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today