From: Roman Kennke <roman@ke...> - 2007-04-13 08:07:11
thanks for figuring out the XAuth problem. I integrated the proposed fix
in the development version.
Keep me updated on your progress.
Am Donnerstag, den 12.04.2007, 18:57 -0400 schrieb Scott Gilbertson:
> Having failed in my early feeble attempts to get GCJ + libjava + X peers +
> Escher built and working, I thought I'd step back a bit and run Escher by
> - linux: Fedora Core 6
> - gcj 4.1.1 to compile
> - gij 4.1.1 to run
> - "java gnu.x11.test.Hello" as test program
> XAuthority was giving me trouble. I ran xauth and added my X server's IP
> (with a command like "generate 111.222.333.444:0"), but
> Display.get_authority would never find a match. Some printlns told me
> Display.get_authority was finding the record OK, but auth.hostname was null.
> I worked around it with this change to Display.init(), which I claim would
> be reasonable (cleaned up slightly) for the released code:
> //byte auth_name = xauth.protocol_name;
> //byte auth_data = xauth.protocol_data;
> byte auth_name = null;
> byte auth_data = null;
> if (xauth != null)
> auth_name = xauth.protocol_name;
> auth_data = xauth.protocol_data;
> auth_name = new byte;
> auth_data = new byte;
> The idea is that if it can't find a match for the server IP in .Xauthority
> (or if you don't even have a .Xauthority file), it will use "no explicit
> authorization" as described in the Connection Initiation section of the X
> protocol document.
> As far as I can tell, libX11 does not require the .Xauthority file (i.e. my
> existing gcj/libjava/xlib programs don't need it), so it would probably be
> appropriate for Escher to also work without that file.
> Hello.class works now. I tried the same change on Windows, with the cygwin
> X server, and it works there too. It says "Can't find Xauthority file", but
> the zero-length auth_name and auth_data work fine for connecting to my X
> server and . I tried the other programs in gnu.x11.test and they all worked
> on both Linux and Windows too. I'm wondering if I can use Windows +
> NetBeans + Sun JRE + Classpath + Escher + cygwin + X server to evaluate the
> X peers before moving on to a GCC build. I may try that in the next few