Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm using Ubuntu 13.10 (with JDK 1.7.0_45).

I've downloaded and uncompressed Eclipse Kepler for Java EE Developers.

The software menus are messed up. I didn't notice similar problems in other software.

When I click any menu in Eclipse, the drop-down seems to be "cut". Sometimes the drop-down shows, but the options are invisible.

I tried Eclipse Indigo, but the same problem occurs.

share|improve this question
    
I have the same problem but with Eclipse CDT, Also noticed then if I run eclipse using sudo the menus are fine. –  kroiz Oct 19 '13 at 19:26
add comment

6 Answers

up vote 44 down vote accepted

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.


Sources:

share|improve this answer
1  
This was a working fix for me but it has broken again and this doesn't solve it anymore –  user1128171 Dec 17 '13 at 8:21
    
@user1128171 It still works for me. –  Kurt Bourbaki Dec 17 '13 at 9:32
    
A short explanation (or a link) on how to create the eclipse.desktop file would come handy. –  Luís de Sousa Jan 18 at 20:22
1  
@LuísdeSousa as wilf wrote, simply running sudo gedit /usr/share/applications/eclipse.desktop will create the eclipse.desktop file. –  Kurt Bourbaki Jan 19 at 15:54
2  
Kurt, what is exactly the right content? –  Luís de Sousa Jan 20 at 7:27
show 8 more comments

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
share|improve this answer
    
Thanks for pointing me to ~/.local/share/applications/Eclipse.desktop –  blackbird07 Feb 7 at 0:30
    
Thank you. I edited my answer adding the ~/.local path. –  Kurt Bourbaki Mar 5 at 8:56
    
This was it! I was wondering why mt changes in the desktop file wasn't taking effect, it was all because of the .local version of the desktop file... –  Deep-B Mar 23 at 18:39
add comment

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.
share|improve this answer
    
I don't have a file like that, the terminal didn't return any results. –  Jeroen Bollen Oct 26 '13 at 18:49
2  
@JeroenBollen You can create that file and fill it with the content I wrote in my post above (How To solve Eclipse menu issues in Ubuntu 13.10). –  Kurt Bourbaki Nov 13 '13 at 8:48
add comment

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.

share|improve this answer
1  
this is the only solution that works for me. adding Exec=env UBUNTU_MENUPROXY= eclipse to my eclipse.desktop file doesn't solve the problem for me on Ubuntu 13.10 :-( –  Chris Mar 22 at 10:18
add comment

You can try this : http://ubuntuforums.org/showthread.php?t=2181641&p=12819998#post12819998 The menu of Eclipse do not show in Unity Global Menu. Works with me.

share|improve this answer
    
Worked for me too but require executing from command line, also with CDT I eclipse would not recognize c++ and claims no available editor but that was fixed by deleting .metadata and restarting. –  kroiz Oct 19 '13 at 19:52
1  
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  minerz029 Feb 5 at 11:53
add comment

In my case the file didn't exist,

I had to create it in ~/.local/share/applications

just create eclipse.desktop containing

Version=4.3.0
Name=Eclipse
Exec=env UBUNTU_MENUPROXY= path=/home/abali/apps/eclipse/eclipse Icon=/home/abali/apps/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=IDE;

Don't forget to do

source eclipse.desktop

, then open eclipse and it just works.

share|improve this answer
1  
What? source eclipse.desktop? Don't do this, it's completely unnecessary and may have unwanted effects. –  minerz029 Jan 12 at 21:25
add comment

protected by Community Jan 23 at 9:24

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.