Hi,
gnuclient/gnuserver with X11 connections forwarded over ssh stoped working
for me after upgrading to Fedora 10. More precisely tty sessions still work
but frames on the remote display fail with an authorization problem.
Every other X program works perfectly through the same ssh connection, also
starting xemacs opens an X session of it just fine.
Only gnuclient fails..
After some investigation, this is what happens:
xemacs is started on host "bob" in a gnome session and XOpenDisplay uses
implicitly
DISPLAY=:0.0
and
XAUTHORITY=/var/run/gdm/auth-for-XXXX/database
for the connection.
On host alice I do "ssh nic@bob" with X11 forwarding enabled. Ssh makes
DISPLAY=localhost:10.0 , undefined XAUTHORITY and sets MIT cookie in
.Xauthority (not knowing anything about the XAUTHORITY used by gdm-bob)
gnuclient connects to xemacs@bob with display=localhost:10.0 and in device-x.c
XOpenDisplay is called correctly with this value. Unfortunately - XAUTHORITY
is set to a value different to what it is in the gnuclient, XOpenDisplay does
not get the right cookie and fails with a cryptic error.
So if it is supposed to work gnuclient must pass both the DISPLAY and XAUTHORITY
values (or lack of it) to the server.
Then around the XOpenDisplay call in device-x.c the XAUTHORITY enviroment variable
needs to be manipulated.. what a mess.
As a quick workaround, it is possible to do
cat .Xauthority >> /var/run/gdm/auth-for-XXXX/database
or equivalent using "xauth" before calling gnuclient. However the value of
XAUTHORITY
is not known within the ssh session so it is not quite so trivial to script this.
Richard
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta