以eclipse举例
1.在桌面写文件eclipse.desktop
sudo vim eclipse.desktop
[Desktop Entry]
Name=Eclipse
Comment=Multi-platform code editor for Linux
Exec=/home/inexbot/eclipse/eclipse
Icon=/home/inexbot/eclipse/icon.xpm
Type=Application
StartupNotify=true
MimeType=text/plain;
(PS:文件目录必须为绝对路径,不能使用~/代替)
2.运行时出现untrusted不信任提示
在终端输入
chmod +x xxx.desktop
3.执行出错
在终端输入下列代码查看错误
desktop-file-validate xxx.desktop