Declaring a ceasefire between Eclipse and GTK+

February 15, 2010

Whenever I install Eclipse or SpringSource Tool Suite in Ubuntu 9.10, I tend to forget about a little bug in Eclipse which, when paired with GTK+ 2.18 and later, causes certain behavioral oddities such as unresponsive buttons, missing selection options, etc.

The workaround for this is to set the GDK_NATIVE_WINDOWS environment variable to true. This is most easily done by creating a startup script for eclipse:

eclipse.sh:

export GDK_NATIVE_WINDOWS=true
<eclipsedir>/eclipse

Alternatively, one can simply drop the export into .bashrc:

.bashrc:

export GDK_NATIVE_WINDOWS=true