RedHat CentOS系列桌面系统添加图表到桌面、开始菜单

图标加到桌面实际上就是编写一个.Desktop的配置文件使gnome-session等程序读取

以Eclipse 为例

桌面

[Desktop Entry]
Name=Eclipse
Comment=Use the code line
TryExec=gnome-terminal
Exec=/opt/eclipse/eclipse/eclipse
Icon=/opt/eclipse/eclipse/icon.xpm
Type=Application
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
X-GNOME-DocPath=/opt/eclipse/eclipse/readme/readme_eclipse.html
X-GNOME-Bugzilla-Bugzilla=eclipse
X-GNOME-Bugzilla-Product=eclipse
X-GNOME-Bugzilla-Component=BugBuddyBugs
X-GNOME-Bugzilla-Version=4.12.0
Categories=GNOME;GTK;System;TerminalEmulator;
StartupNotify=true
X-GNOME-SingleWindow=false

 

开始菜单

cd /usr/share/applications

vi eclipse.deskop

[Desktop Entry]
Name=Eclipse
GenericName=Text Editor
Comment=C++ Editor
Comment[zh_TW]=編輯文字
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Exec=/opt/eclipse/eclipse/eclipse
Icon=/opt/eclipse/eclipse/icon.xpm
Type=Application
Terminal=false
#Categories=Application;Utility;TextEditor;X-Red-Hat-Base;
Categories=Utility;TextEditor;Development;IDE;#此行决定您的程序在哪个子菜单
Encoding=UTF-8
StartupWMClass=Eclipse
X-Desktop-File-Install-Version=0.23

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值