After an upgrade to Ubuntu 9.10 (Karmic Koala) I noticed a few random issues in Eclipse has popped up. Most notably, I was no longer able to click the OK buttons on pop up windows – I had to highlight them with the mouse then hit either space or enter on the keyboard to select them.
Other symptoms included the “Install new software” window not listing any options when I entered an update URL (the options were there, but just not visible – clicking randomly within the selection box seemed to activate/deactivate them). Also the buttons were missing from the search view, so I was no longer able to scroll through the results after a full file search.
Initially, I thought this may have been a Java incompatibility with Karmic – I’d installed the Beta version on the my desktop PC weeks before and experienced the same issue, but assumed it was because the OS wasn’t finished.
Starting from 2.18 on, GTK+ changed some of its internal behaviour (google for “client side windows”). This change is intentional, and needed for other development. It doesn’t make any difference to programs using GTK+ correctly, but it makes problems with programs that use GTK+ in weird ways, making wrong assumptions that only accidentally worked in the past. So, to ease the transition until those programs get fixed, an environment variable has been introduced to simulate the old behaviour.
Reading through the rest of the discussion, it turned out that
won’t shouldn’t affect copies of Eclipse checked out from the Ubuntu package repository, but seeing as I was using a copy of PDT I’d got straight from the Eclipse website, I was seeing the problems.
The fix is relatively simple. Create a file in your home folder (or wherever you want) called
eclipsefix.sh – open it and add the following lines:
export GDK_NATIVE_WINDOWS=true /opt/eclipse/eclipse
/opt/eclipse/eclipse is the location of your eclipse application file).
Make sure you make it executable (
chmod +x ~/eclipsefix.sh) then go to whatever shortcut you usually use to open Eclipse and change the command to point towards the file you just created (ie,
Now whenever you open Eclipse using this shortcut, the script will run and eclipse should work as expected.
According to the eclipse bug tracker, this issue should be fixed in Eclipse 3.5.2
Update 11/11/09: daYmo has commented that to get it to work he had to use
export GDK_NATIVE_WINDOWS=1, so if you have no luck the first time it may be worth giving this a try.