Trifork Blog

XGL and java

August 20th, 2006 by

A couple of months back I tried out a very nice opengl based x server called XGL. I followed the instructions outlined at and had it working in record time. However there was one catch. Java applications would not render properly. For instance when I would start intelliJ Idea all the dialogs , menu items etc would display properly but the main screen would remain gray. I tried playing around with some vm switches for a while but eventually gave up and dismissed XGL for the time beeing. Last week a coworker brought up xgl again and it triggered me to take another look. As it turns out there is a bug in the sun jvm that causes this behaviour. The issue is described in this post and one of the developers was kind enough to provide a workaround. So I applied the patch, rebuild the deb file and it worked. In case anyone is interested i uploaded the patched deb here or if you feel like building it yourself these are the basic steps

sudo apt-get install dpkg-dev build-essential
sudo apt-get source xserver-xgl
sudo apt-get build-dep xserver-xgl
cd xserver-xgl-7.0.0
patch -p0 < ~/xgl-java-wmhack.bin dpkg-buildpackage -b -uc cd.. dpkg -i xserver-xgl_7.0.0-0ubuntu4_i386.deb

3 Responses

  1. August 20, 2006 at 03:44 by Thomas Risberg

    I ran into the same issue running SUSE Linux Enterprise Desktop 10 64bit. Turned out that adding “export AWT_TOOLKIT=” to my .profile fixed the problem for now. I tried different settings like AWT_TOOLKIT=MToolkit or AWT_TOOLKIT=XToolkit but they either caused a startup error or they displayed the same behavior. I’m not sure why an empty setting would work, but it does for now.

  2. September 11, 2006 at 18:37 by Manuel

    Hi, when i do dpkg-buildpackage i have this error

    No rule to make target `glapi.lo’, needed by `’. Stop.
    and then it stop…

    there is a solution ??

  3. September 11, 2006 at 23:15 by Manuel

    i also tried to install you precompiled .deb, but when i start the session i see only a white screen :'(

    Can you upgrade .deb with another one from today cvs ?