Fixing Eclipse in Ubuntu 9.10 Karmic Koala

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.

But after a bit of digging around, I found a bug logged on the Ubuntu Bug tracker. A post by Holger Berndt seems to confirm the bug is in Eclipse:

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 – open it and add the following lines:


(where /opt/eclipse/eclipse is the location of your eclipse application file).

Make sure you make it executable (chmod +x ~/ then go to whatever shortcut you usually use to open Eclipse and change the command to point towards the file you just created (ie,/home/mou/

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.

92 Responses to “Fixing Eclipse in Ubuntu 9.10 Karmic Koala”

  1. Thanks SO MUCH for this information. I couldn’t figure out why nothing was working, and this fixed the problems. It’s a HUGE help!

  2. aYo

    Hi There,
    I tried your solution but, it did not work

    export GDK_NATIVE_WINDOWS=true

    thats what I set up, am I missing something?

  3. NKjoep

    yes, we’re gettin this error…

    A fatal error has been detected by the Java Runtime Environment:
    # SIGSEGV (0xb) at pc=0x002bd856, pid=4776, tid=3078371008
    # JRE version: 6.0_16-b01
    # Java VM: Java HotSpot(TM) Client VM (14.2-b01 mixed mode, sharing linux-x86 )
    # Problematic frame:
    # C [] pango_layout_new+0x36

    any fix ?

  4. gabe

    THANK YOU !!!

    i am very grateful for this post 🙂

    the bugs i observed were
    a) clicking run inside run configurations dialog did nothing
    b) clicking find or replace inside find and replace dialog did nothing

    now these things work again.

    really thanks.

  5. martin

    awesome! thank you so much!

  6. dodger


  7. sthaiya

    Awesome that fixed my problems

  8. ganaa72001
    sudo /home/user/Program/eclipse/eclipse

  9. Hi Chris,

    Thank you for this rather helpful post. The button issue was rather annoying. I am looking forward to the eclipse 3.5.2 release…


  10. John Goufas

    Thanks a lot!Great help!

  11. Kenneth

    Thanks very much! I was pulling my hair out…..

  12. tjnic

    Thanks so much. I was about to reinstall the whole machine. Thank god for Google and people like you. Thanks again.

  13. Miguel

    Thanks for the tip.

    I am noticing, however, that I don’t see the icons in the contextual menu right click-new (the new file list used to have an icon for the default files). Can you see the icons?

    • thomas

      It’s a Gnome 2.28 issue.
      Start gnome-appearance-properties select the Interface tab and activate the option ‘Show icon in menus’

      Btw. thanks for the blog on eclipse issue with karmic. 🙂

    • lior

      Yeh, ,me too. The export did not solved it.

  14. Albert M.

    Thanks so much.

  15. Roberto

    What a helpful post. You’ve helped me finish this big headache. In my office things are so full of stress and this issue was squeezing my nerves!

    Saludos from México. 😉

  16. Thanks, I’ve had tons of small issues with eclipse after moving to 9.10, find not working as expected, no console even with printlns firing…

    BTW How does one find your flickr stream from here? Cool pics, was thinking of adding you as a contact.

    – Peace

    • mou

      The “more” link under the photos in the sidebar should take you to my flickr page. 🙂 Glad you like!

  17. Thank-you so much!!! I am migrating to Ubuntu Studio after the Windows Vista failure, and then Windows 7 not being great enough. Unfortunately, I couldn’t get Eclipse to work, but now it is! Thank-you so much for posting this!!

  18. jerome bulanadi

    Buttons where annoying that I should press enter after click.

    With that shell script, everything worked normally for me. Thanks.

    • mou

      I know what you mean, clicking then having to hit “enter” was becoming a bit of a pain in the ass. 🙂

  19. Dave

    You dude 🙂 Thanks very much.

  20. valerian

    Thanks much man. Helped a lot.

  21. Ach, you’re so bloody clever 😛

  22. Chui

    Great!! It worked for me, thank you!

  23. dermis

    now im falling in love back to my eclipse + karmic

    thanks alot lot lot

  24. Suleyman

    Thanks dude! Useful bit of information.

  25. daYmo


    your script doesn’t work on my computer.

    have to use that one :


  26. Thank you so much.
    Such inadvertent changes can take you hours…

  27. It’s amazing! nock down my headache!

  28. Thanks! This problem also affected my Google Chrome browser. The browser’s drop-downs weren’t populated, but I put the GDK_NATIVE_WINDOWS variable in my .bashrc and now both Eclipse and Chrome behave as expected.

  29. harman

    Thanks You Save My Time Thank to you very much Dear…….

  30. Wuzheng

    THANK YOU !!!

    i am very grateful for this post!

  31. Hi thx for this helpful post.

    this works fine for me with double click; the shortcut launcher point to and it doesn’t work.
    how can i create that shortcut launcher?

  32. ngc

    thanks it works saved my day

  33. mehdi

    Thank you.

  34. Thank you so much!

  35. Sebastian

    worked for me, thanks a lot

  36. BadBUTA

    Thank you!!
    It works for me!

  37. dan

    seemed to work for me. problem was driving me nuts! thanks.

  38. Tom

    Much appreciated 🙂

  39. Paco

    I`ve tried with this script (in the two ways with “export GDK_NATIVE_WINDOWS=1” and “export GDK_NATIVE_WINDOWS=true”) but I didn`t solve the problem.
    I have ubuntu 9.10 and Eclipse Ganymede (latest version)
    Any suggestion


  40. It worked for me Using Fedora 12, KDE4 and the latest Eclipse PDT 20090920-1017.

  41. ameture

    Thanks a lot 🙂

  42. tunghd

    thank!! I resolved my problem. Thank again

  43. ????? ?????

    Hi, thanks for the write-up, you saved me lots of digging around.

    Here’s another way to flag GDK_NATIVE_WINDOWS without having an extra script lying around. If you start Eclipse via a launcher or a menu, then you can simply add the following in the eclipse.desktop file:

    Exec=env GDK_NATIVE_WINDOWS=true /path/to/eclipse

    Depending on the mode of installation, eclipse.desktop may be found in /opt/eclipse, /usr/share/applications, /usr/local/share/applications, or perhaps even ~/.local/share/applications.

  44. you made my day, thanks 😉

  45. Arta

    Thanks alot,
    In Persian we say: “Khoda (=God) kheiret (=best things for you) bede (=give)”

  46. Greetings.
    This solved my problem with some actions on the Eclipse GUI but there’s still one more thing I can not make work well and it’s about input fields.
    For example I can’t put a new url for SVN repositories. The input fields looks like disable so it’s impossible to write or select it.

    Is this an issue about this variable or I’m missing something else?

    Thanks in advance…

  47. News.
    I noticed that the combo-box input type is the form object that can’t yet work.

    Did someone found this same error?

  48. Thanks, works great!
    I also noticed this problem in the Android SDK’s “android” tool, which uses Eclipse’s GUI toolkit.

    Without your trick, the cumbersome way to achieve things was to:
    – Press after every unresponsive button click
    – Resize the window whenever an area does not show the information it should show (such as in the Software Update)

  49. Uwe

    Thanks so much – works great on Ubuntu and Open Suse

  50. Saminda

    This has being a rather annoying issue. Thanx for taking time to put the solution in to words.

  51. z0n3r

    Thanks so much – solved the problem immediately after many weeks of verbal abuse and misplaced anger endured by the poor little rodent on my desk.

    Ah – it’s the small things, I tell you!

  52. Thank you for the GREAT help!

  53. rceee

    Thank you. Worked perfectly.

  54. Adam H

    Thank you sooo much for this answer! I set my environment variable and everything worked great! I am using Ubuntu 9.10 w/ jdk 1.6.0_16 and nVidia dual monitors and Eclipse Galileo (3.5.1.M20090917-0800) downloaded straight from website.

  55. Kosolapy

    Thank you. This post heled me to run eclipse 3.1.1 on debian lenny.

  56. Muchas gracias man !!

    Thanks a lot man !!

  57. Brian

    Thanks! Saved a few strands of hair from getting pulled out in frustration!

  58. vvforall

    thanks man! it really helped me out!

    what about the icon problem with the default files?
    does anybody solved it?

  59. Arvind

    This fix helped me a lot.

  60. Chris Boyne

    Thanks so much for posting this, I need 3.1.1 for an old plugin and had the exact problem. Now solved thanks to you! All the best

  61. Henri

    Script work’s otherwice but it doesn’t pass filepath to open for eclipse -> can’t open files with eclipse using that script.

    Any who can help with that?

  62. Rheza

    It is working nicely..

    Thank you very much..

  63. magesh

    Thanks! 🙂

  64. This was driving me nuts. You rock, dude.

    I have a minor variation for people like me that have a dozen or so workspaces with launchers all over the place for them. Just edit the launcher command to add -DGDK_NATIVE_WINDOWS=1 to the command, a full example is:

    /opt/eclipse/eclipse -DGDK_NATIVE_WINDOWS=1 -data /home/roger/workspace

    Under Lucid this made the difference between debug buttons appearing and not appearing.

  1. Mirsal Ennaime (mirsal) 's status on Monday, 02-Nov-09 12:38:37 UTC -
  2. Andrew Gee (andrewgee) 's status on Saturday, 07-Nov-09 15:17:35 UTC -
  3. Correggere Eclipse su Ubuntu 9.10 Karmic Koala | HGEInformatica
  4. Correggere Eclipse su Ubuntu 9.10 Karmic Koala | Fabrizio Savella
  5. Karmic – first impressions « petejcullen
  6. Correggere Eclipse su Ubuntu 9.10 Karmic Koala | Risorse Free
  7. Problems with Eclipse in Ubuntu 9.10 (Karmic) | OpenSourceEditor
  8. Eclipse buttons not working on Ubuntu Karmic Koala « format internet:
  9. Vista » Blog Archive » Karmic Eclipse
  10. » Eclipse + Ubuntu + Groovy pain
  11. No java virtual machine found when running Eclipse PDT 2.1-SR2 « Adrien's Blog
  12. Eclipse Galileo (3.5) sur Linux (Kernel 2.6.31-19)- Les boutons ne réagissent pas à la souris « Stéphan Champagne
  13. Eclipse Galileo su Kubuntu 9.10: Android, SVN, problemi Gtk | Rainbowbreeze - Alfredo Morresi website
  14. Eclipse + Ubuntu + Groovy pain – Half Decent
  15. Кнопки диалогового окна не работают в Eclipse в Ubuntu 9.10
  16. Buttons on my Ubuntu Machine - Boot Panic

Leave a Reply