Eclipse menus are cut off or don't show

Solution 1:

How To solve Eclipse menu issues in Ubuntu 13.10

(Stable way, until someone fixes the bug)

This method takes for granted that you already have your eclipse.desktop file (or that you can alternatively create a new one from scratch). Otherwise, you can momentarily take a look at the "fast way" below.

  1. Open your eclipse.desktop file:

    sudo -H gedit /usr/share/applications/eclipse.desktop
    

    (If you can't find it in this path, try in ~/.local/share/applications/eclipse.desktop. Otherwise, you could have to find yours using locate command).

  2. Replace the Exec= line with this:

    Exec=env UBUNTU_MENUPROXY= eclipse
    

    Where "eclipse" is the path to your eclipse executable. In this case it's just "eclipse" since there's a symlink in /usr/bin folder.

    NOTE: If you can't find your eclipse.desktop file, you can simply create one from scratch in the above path, and fill it with these lines:

    [Desktop Entry] 
    Type=Application 
    Name=Eclipse 
    Icon=eclipse 
    Exec=env UBUNTU_MENUPROXY= eclipse 
    Terminal=false 
    Categories=Development;IDE;Java;
    
  3. Save the file.

Now you can run Eclipse from its icon as usual.

(Fast but repetitive way)

If you haven't got any eclipse.desktop file and you don't want to create it at the moment, you can simply run Eclipse with this command:

UBUNTU_MENUPROXY= eclipse

where "eclipse" is the path to your eclipse executable. Note that this is just the fast way to run Eclipse once. If you don't want to remember this command and use it every time you have to run Eclipse, follow the "stable way" above.

Or you can make an alias out of it

alias eclipse = 'UBUNTU_MENUPROXY= eclipse'

and the command eclipse will work fine.


Sources:

  • Keenformatics - How To show Eclipse menu in Ubuntu 13.10 Saucy Salamander (my blog)
  • Ubuntu documentation - EnvironmentVariables
  • Eclipse menus doesn't show up in Saucy

Solution 2:

I had the same problem, my laziest fix is

  1. Open a Gnome Terminal (CTRL+ALT+T Default Shortcut)
  2. Issue UBUNTU_MENUPROXY=0 eclipse.

Works for me.

Solution 3:

In my case there were two versions of the file in /usr/share/applications:

eclipse.desktop
Eclipse.desktop

Either delete one of them, or change the Exec line in both of them as described above. The third version of the file is in the home folder:

~/.local/share/applications/Eclipse.desktop

You can either delete this last one or change the Exec line in this one too.

All you have to do is change the Exec line as follows:

Exec=env UBUNTU_MENUPROXY= /path/to/eclipse/eclipse

Solution 4:

You need to edit a file called eclipse.desktop to include the MENUPROXY option.

  • Depending on your install, this location will vary. To find it, type sudo find / -name eclipse.desktop.
  • Once you find the location, open up the file in your favorite editor. For me, this is vim, so I type sudo vim /usr/share/applications/eclipse.desktop (Note that your location may be different, see the first step.
  • When in the file, look for a line that looks something like this-> Exec=/opt/eclipse/eclipse. (Note that yours may just have the "eclipse" in there without the full path).
  • After finding that line, comment it out. Then add this line: Exec=env UBUNTU_MENUPROXY= /opt/eclipse/eclipse (Edit as needed. If your install did not have the full path, or if it had a different path, adjust here). Note the space after MENUPROXY= . This is important. ` Start up Eclipse and enjoy menus on the top again.