gentoo / 未分类 · 2012年7月30日

手动创建菜单选项

有时,我们下载解压便可以的软件,但应用程序菜单没有菜单选项,使用起来不太方便,其实,我们可以手工的,如下创建一个菜单选项:
evan@mygentoo ~ $ sudo vi /usr/share/applications/eclipse.desktop
[Desktop Entry]
Name=eclipse
GenericName=Text Editor
Comment=Edit text files
Keywords=Plaintext;Write;
#Exec=eclipse %U
#Exec=/home/evan/c/eclipse/eclipse %U
##我的eclipse 可执行文件的目录
Exec=/home/evan/c/eclipse/eclipse
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Development;IDE;
#MimeType=text/plain;
#Icon={安装目录}/Komodo-Edit-7/share/icons/komodo32.png
Icon=/home/evan/c/eclipse/icon.xpm
Categories=GNOME;GTK;Utility;TextEditor;
Actions=Window;Document;
下面是 系统自带的anjuta,我们可以用它作参考,不过他很罗嗦哦
evan@mygentoo ~ $ cat /usr/share/applications/anjuta.desktop
[Desktop Entry]
Name=Anjuta IDE
Name[zh_CN]=Anjuta IDE
GenericName=Integrated Development Environment
GenericName[zh_CN]=集成开发环境
Comment=Develop software in an integrated development environment
Comment[zh_CN]=在集成开发环境中开发软件
Exec=anjuta %F
Icon=anjuta
Terminal=false
X-MultipleArgs=false
Type=Application
Categories=GNOME;GTK;Development;IDE;
StartupNotify=true
MimeType=application/x-anjuta;
X-GNOME-DocPath=anjuta/anjuta-manual.xml
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=anjuta
X-GNOME-Bugzilla-Version=3.2.2
X-GNOME-Bugzilla-Component=unknown