将图标应用于bash脚本


Answers:


20

像这样创建一个.desktop文件,并将其放在/ usr / share / applications /

[Desktop Entry]
Type=Application
Name=XChat Firefox
Exec=/usr/bin/your_script
Icon=/usr/share/icons/xchats_icon

然后,带有XChat图标的“ XChat Firefox”将成为可启动的应用程序。Exec也可以将bash命令(可选地带参数)作为其值。

有关.desktop格式的完整说明,请参见此规范


2

将您的appname.desktop文件复制到/ usr / share / applications之后,您可能需要等待几分钟,而kbuildsycoca4会重建系统配置高速缓存。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.