升级到 Ubuntu 13.10 后,Eclipse 菜单不显示
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19452390/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse menus don't show up after upgrading to Ubuntu 13.10
提问by positron
After upgrading to Ubuntu 13.10, when I click on any menus in Eclipse (Help, Window, Run) they don't show up. Only menu stubs and selection are visible.
升级到 Ubuntu 13.10 后,当我单击 Eclipse 中的任何菜单(帮助、窗口、运行)时,它们不会出现。只有菜单存根和选择是可见的。
I tried installing fresh 4.3 and the same thing is happening. Is anyone else experiencing this behavior?
我尝试安装新的 4.3 并且发生了同样的事情。还有其他人遇到这种行为吗?
回答by Learning
The same question has been answered on askubuntu:
在 askubuntu 上也回答了同样的问题:
Eclipse menus are cut off or don't show
I might have found a possible solution for your problem. I have experienced the same issue as you have described, Ubuntu 13.10 64-bit Unity, Eclipse 4.3.0, menus were not visible.
我可能已经为您的问题找到了可能的解决方案。我遇到了与您描述的相同的问题,Ubuntu 13.10 64 位 Unity,Eclipse 4.3.0,菜单不可见。
So I realise that it might be helpful if I clarify myself, the desktop shortcut file for Eclipse would contain something like this:
所以我意识到如果我澄清自己可能会有所帮助,Eclipse 的桌面快捷方式文件将包含如下内容:
[Desktop Entry]
Version=4.3.0
Name=Eclipse
Comment=IDE for all seasons
#Exec=/home/USERNAME/Dokument/eclipse/eclipse
Exec=env UBUNTU_MENUPROXY=0 /home/USERNAME/Dokument/eclipse/eclipse
Icon=/home/USERNAME/Dokument/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Utility;Application
The row Exec=env UBUNTU_MENUPROXY=0 /home/USERNAME/Dokument/eclipse/eclipse
, part referenced in the post I pointed to, is the one that makes menus visible, et voila! :)
Exec=env UBUNTU_MENUPROXY=0 /home/USERNAME/Dokument/eclipse/eclipse
我指出的帖子中引用的行是使菜单可见的行,等等!:)
In my case this file (eclipse.desktop
) resides in /usr/share/applications/
在我的情况下,这个文件 ( eclipse.desktop
) 驻留在/usr/share/applications/
Hope this helps.
希望这可以帮助。
回答by Figa17
You have to create a new file to open eclipse.
您必须创建一个新文件才能打开 eclipse。
#!/bin/bash
export UBUNTU_MENUPROXY=0
path_to/eclipse/eclipse
回答by Bosko Mijin
This bug has been confirmed in Ubuntu 13.10, here is a link. In order to overcome problem, you have to change your eclipse.desktop file in part of Exec passing env UBUNTU_MENUPROXY with eclipse path and eclipse will be runnable from launcher with functional menu bar. Here is patern for changing eclipse.desktop file:
此错误已在 Ubuntu 13.10 中得到确认,这是一个链接。为了解决问题,您必须在 Exec 传递 env UBUNTU_MENUPROXY 和 eclipse 路径的部分更改您的 eclipse.desktop 文件,并且 eclipse 将可以从带有功能菜单栏的启动器运行。这是更改 eclipse.desktop 文件的模式:
Exec=env UBUNTU_MENUPROXY= path/to/eclipse
回答by Dino Pham
You should type export UBUNTU_MENUPROXY=0
before opening eclipse, and you have to open eclipse from the terminal instead of the global menu.
您应该export UBUNTU_MENUPROXY=0
在打开 eclipse 之前输入,并且您必须从终端而不是全局菜单打开 eclipse。
回答by Desta Haileselassie Hagos
I had the same disabled sub-menus problem with Eclipse Kepler 64-bit on Ubuntu 13.10. But I finally managed to get it run with the following little work around. This bug has actually been already reported in this link.
我在 Ubuntu 13.10 上使用 Eclipse Kepler 64 位时遇到了同样的禁用子菜单问题。但我终于设法通过以下一些小工作让它运行。这个错误实际上已经在这个链接中报告了。
Create a eclipse.desktop
file in /usr/share/applications/
with the following contents.
使用以下内容创建一个eclipse.desktop
文件/usr/share/applications/
。
[Desktop Entry]
Version=4.3.0
Name=Eclipse
Comment=IDE for all seasons
Exec=env UBUNTU_MENUPROXY=0 /home/USERNAME/eclipse/eclipse
Icon=/home/USERNAME/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Utility;Application
or else, you could also try with the following executable bash script file which opens Eclipse. Place the file in /bin
directory or /usr/local/bin
.
或者,您也可以尝试使用以下打开 Eclipse 的可执行 bash 脚本文件。将文件放在/bin
目录或/usr/local/bin
.
#!/bin/bash
export UBUNTU_MENUPROXY=0
path_to/eclipse/eclipse
回答by Waqas
1) First, close eclipse and do this:
1)首先,关闭eclipse并执行以下操作:
sudo gedit /usr/share/applications/eclipse.desktop
2) at the end of this file just copy-paste this line
2)在这个文件的末尾复制粘贴这一行
Exec=env UBUNTU_MENUPROXY=0 /your/path/to/eclipse/binary
Open eclipse, the eclipse's menu will start showing up. (Works on On post Ubuntu version 12.04)
打开eclipse,eclipse的菜单就会开始出现。(适用于 Ubuntu 12.04 版后)
回答by tharindu_DG
Nothing worked for me until I added the following line to the .profile
file in my home folder and restarted my computer.
.profile
在我将以下行添加到我的主文件夹中的文件并重新启动我的计算机之前,对我没有任何作用。
export UBUNTU_MENUPROXY=0
It worked for me.
它对我有用。
回答by Ivan Klass
As for me, I found it better to edit eclipse starter itself,
mine is /usr/bin/eclipse
(root permission required).
至于我,我发现编辑 eclipse starter 本身更好,我的是/usr/bin/eclipse
(需要 root 权限)。
Last line:
最后一行:
exec $ECLIPSE "$@"
becomes:
变成:
env UBUNTU_MENUPROXY=0 $ECLIPSE "$@"
So, now it doesn't matter how it starts - by desctop icon, terminal command or self-restart after new plugin installation.
所以,现在它如何启动并不重要 - 通过 desctop 图标、终端命令或新插件安装后的自重启。
回答by throbi
For those who use the ADT (Android Developer Tools) bundle:
对于那些使用 ADT(Android 开发者工具)包的人:
- Create a launcher for eclipse
- edit /home//.local/share/applications/adt.desktop the way described by the accepted solution.
- 为 Eclipse 创建一个启动器
- 按照已接受的解决方案描述的方式编辑 /home//.local/share/applications/adt.desktop。
This will bring the menus back, however not integrated into the top bar.
这将带回菜单,但不会集成到顶部栏中。
Robert
罗伯特
回答by xpto
I solved it just opening my Eclipse by terminal as SU.
我只是通过终端作为 SU 打开我的 Eclipse 来解决它。
sudo ./eclipse