Fix Eclipse (luna/mars/neon) display on Ubuntu 14.04 and newer

Update: This ‘trick’ still works for newer versions of Eclipse (e.g. mars, neon, oxygen) and Ubuntu versions (14.10, 15.04, 15.10, 16.04, 16.10). I’m using ‘rolling’ updates so I’ve tested most versions mentioned above.

I recently installed Eclipse ‘Luna’ on an Ubuntu 14.04 system and encountered a few display issues. Eclipse was rendered unusable for some GTK reasons…

It took me a while to find a somewhat related blog post that led me to a solution for the missing views and errors when starting Eclipse.

In case of starting Eclipse from a console two environment variables need to be set in advance  to avoid a corrupted Eclipse window:

export SWT_GTK3=0
export UBUNTU_MENUPROXY=0

In my case I created a desktop entry ~/.local/share/applications/eclipse.desktop to facilitate the startup. Adapt it to your needs:

[Desktop Entry]
Version=4.4
Name=Eclipse
Comment=Eclipse IDE
Exec=env UBUNTU_MENUPROXY=0 SWT_GTK3=0 /home/kai/eclipse/eclipse
Icon=/home/kai/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Utility;Application

20 thoughts on “Fix Eclipse (luna/mars/neon) display on Ubuntu 14.04 and newer

  1. Thanks a lot.
    Works like a charm !

    I did found posts about the :
    UBUNTU_MENUPROXY=0

    But not the second one
    SWT_GTK3=0

    This was a really anoying bug.

  2. I’ve tried both, and I just get a blank window every time I start Eclipse, it’s totally unusable! It’s basically frozen.

    Guess I’ll wait until the GA

  3. I’m still begginer in ubuntu, i added the lines on the eclipse.desktop file that you suggest but if i do this the icon on the launcher disappear, is that the correct way to send these parameters on the desktop file?
    Exec=env UBUNTU_MENUPROXY=0 SWT_GTK3=0 (and on the next line the directory)?
    thanks for the help

    • Hi Richard, the “Exec” line should contain the environment settings you’ve mentioned as well as the path to the new eclipe. If there’s a new line in my post it’s due to WordPresses’ formatting. — Kai

  4. while launching eclipse I m getting error window as “The Eclipse executable launcher was unable to locate its
    companion launcher jar.” i have tried your solution but it is nt working..

  5. Pingback: Eclipse 4.4 Luna GTK wrapper | My Personal Blog

  6. I noticed display and scrollbar arrow issues after switching from ‘luna’ to ‘mars’ and the solution proposed by Kai worked perfectly

    Quick Tip: Instead of editing desktop files you can simply open the shortcut’s ‘properties’ and add the environment fix in the ‘command’ field like this:

    Command: env UBUNTU_MENUPROXY=0 SWT_GTK3=0 //eclipse

    • Hi db..
      I am new to Eclipse and linux. I am getting the same problem as yours. Can you please elaborate the steps to do so.

  7. SWT_GTK3=0 is again necessary for Eclipse Mars 4.5.1 + Ubuntu 15.10 (scrolling and flickering issues), but I don’t need the menu proxy workaround.

Leave a Reply to Kai Cancel reply

Your email address will not be published. Required fields are marked *