ubuntu如何为应用添加桌面图标

在Ubuntu为应用创建桌面图标,以微信为例,在麒麟系统,微信所在目录/opt/weixin

1. 在桌面目录,创建以.desktop为后缀的文件

 cd  /home/用户名/桌面
 touch weixin.desktop 

2. 文件添加执行权限(很重要)

desktop文件只有了执行权限才能双击运行,否则双击只能出编辑页面

  chmod a+x weixin.desktop

3. 编辑文件

[Desktop Entry]
Version=2.1.5
Name=Weixin
Name[zh_CN]=微信
Comment=Tencent Chat Software
Comment[zh_CN]=腾讯聊天软件
GenericName=Chat Software
GenericName[zh_CN]=聊天软件
Exec=/opt/weixin/weixin.sh
Icon=/home/用户名/图片/weixin.jpeg
Type=Application
StartupNotify=false
Terminal=false
Categories=Development;
MimeType=pplication/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https;
posted @ 2023-04-14 09:00  蓝天飞翔的白云  阅读(831)  评论(0编辑  收藏  举报