Title make gnuclient work when gdm moves the xauth file
Type feature Module core code 21.4, core code 21.5
Severity inconvenience Platform unix
Keywords Nosy List
These controls should only be changed by committers and tracker administrators.
Status new   Reason
Priority normal   Assigned To

Created on 2009-05-22.17:03:41 by mike.kupfer, last changed 2009-05-22.17:26:26 by mike.kupfer.

msg1209 [hidden] ([hidden]) Date: 2009-05-22.17:26:26
BTW, I have also tried just changing the XAUTHORITY environment
variable in the XEmacs process, so that it points to the temporary
xauth file that ssh created.  That doesn't work for some reason--I
still get errors about "X11 connection rejected because of wrong
authentication."  And it's more fragile than the approach I'm
suggesting, because XAUTHORITY needs to be reset to the original value
once XEmacs no longer needs to connect to the ssh/X proxy server.
msg1208 [hidden] ([hidden]) Date: 2009-05-22.17:16:46
Recent versions of ssh create a temporary XAUTHORITY file when you
connect using "ssh -X".  This causes problems using gnuclient, because
the XEmacs process doesn't have the right cookie to connect to the ssh
proxy server.  One way to work around this has been to have a script
or something in a dotfile that saves the cookie to ~/.Xauthority, so
that XEmacs can find it.  But in OpenSolaris and Fedora 10, gdm uses a
file other than ~/.Xauthority, and that file might not be known at the
time of the ssh login.

The workaround I'm using right now is to run a "fixxauth" script that does

    xauth list | while read foo; do 
    	gnudoit "(shell-command \"xauth add $foo\")"

So I can do

  alice$ ssh -X bob
  bob$ fixxauth
  bob$ gnuclient

It would be good to get this functionality into gnuclient, so that the
xauth update happens automatically.  Some thought might be needed as
to when gnuclient should do this, e.g., all the time, in response to
an authorization failure (can gnuclient determine such a failure?), or
only if the user gives a (new) command-line flag.
Date User Action Args
2009-05-22 17:26:26mike.kupfersetmessages: + msg1209
2009-05-22 17:16:46mike.kupfersetmessages: + msg1208
2009-05-22 17:03:41mike.kupfercreate