Trouble in accessing `/home/USERNAME/.Xauthority'
Tom H
tomh0665 at gmail.com
Thu Mar 18 06:28:20 UTC 2010
>>>> Because the authority has been moved to
>>>> /var/run/gdm/auth-...-<user>-.../database
>>> Ummm... worked just fine for me on the test 9.10 test machine.
>>> Further details please?
>> From a brand new Karmic VM:
>> $ echo ${XAUTHORITY}
>> /var/run/gdm/auth-for-tomh0665-oM1IAa/database
>> $ ps -ef | grep X | grep -v grep
>> root ... tty7 ... /usrIbin/X ... -auth
>> /var/run/gdm/auth-for-gdm-kniKIS/database ...
> And? Still confused by your comment. .Xauthority is created on any ssh
> -X login to the machine. xauth
> sudo lfwsetup
> sudo ln -fs ~/.Xauthority /root/.Xauthority
> sudo chown USERNAME.root ~/.Xauthority
> (you will have to replace USERNAME with your username)
> and work in 9.10 and 10.04 (providing of course that an ~/.Xauthority
> file exists first). So please clarify/justify:
> "Step 4 will only work in Ubuntu pre 9.10."
The OP is not using "ssh -X ..." so he does not have an .Xauthority in
her/his/root's ~/ by default because 9.10 introduced having the X
authority in /var/run/gdm/auth-for-.../database. It looks like the
Gnome/Ubuntu devs have yet to prevent X from using ~/.Xauthority so I
was wrong, as long as you use "ssh -X". Just runing
touch ~/.Xauthority
sudo ln -fs ~/.Xauthority /root/.Xauthority
will not create a proper X authority.
Furthermore, in 9.10, there is no need for step 4 because 9.10 is set
up to allow launching an X app when logged in a root in terminal.
PS: For the record, using cp or ln to create an X authority for root
is fine (and quick), but if it fails
xauth -f /var/run/gdm/auth-for-gdm-.../database -i extract - $DISPLAY
| xauth -f /path/to/Xauthority merge -
is the "proper" (if much too wordy!) way. [If /root/.Xauthority
exists, you can skip -f /path/to/Xauthority]
More information about the ubuntu-users
mailing list