Skip to main content

Remote Display of Solaris 10 X11 Applications

Posted by spericas on January 16, 2006 at 7:24 AM PST

I use a Powerbook laptop connected to a 20" flat panel as the "display hub" in my office. As much as possible, I'd like to run Windows or Unix applications remotely displaying on the Mac. I've recently got a new Ultra 20 Workstation running Solaris 10 but run into a problem when trying to display certain X11 applications on the Powerbook using Apple's X11 server. More specifically, the following error was displayed when attempting to run any Gnome application remotely:

(ultra20:~) >> gnome-about
The program 'gnome-about' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 9 error_code 3 request_code 128 minor_code 2)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

More importantly, at least for the type of work that I do, Mozilla was aborting with the same error message. After searching for a while without finding the right solution, I came across Stephen Hahn's blog. The solution described in Stephen's blog worked like a charm. So, in my own words, this is what I did to fix the problem (please refer to Stephen's blog for more details).

It turned out that the problem was related to the Xinerama extension as implemented in Solaris. Hence, I suspect that you may run into the same problem running X11 servers on platforms other than Mac OS X. First, I created the file xin_shim.c:

int XineramaGetState() {
        return 0;

Then I compiled it according to the instructions in Stephen's blog (in my case using Sun's C compiler):

cc -o -G -Kpic xin_shim.c

And finally I copied the resulting library ( into /usr/lib/secure and exported the env variable LD_PRELOAD to "/usr/lib/secure/". As the name of the variable suggests, this forces the linker to pre-load the library and fool the system into thinking the Xinerama extension is not supported, thus sidestepping the incompatiblity. Note that if you can't install the library in /usr/lib/secure, you can still set the LD_PRELOAD variable but you will get constant warning messages regarding the "unsecured" library you indicated the system to preload.

Thanks to Stephen for the solution and I hope that describing the solution in this blog will help other people finding it more quickly.

Related Topics >>