如何在 Elementary OS Freya 中将自定义脚本添加到板条(码头)

Web*_*ode 6 shell-script elementary-os pantheon

我正在使用 Elementary OS Freya。
我想将自定义 bash 脚本添加到 plank (dock)。

我该怎么做 ?

小智 5

.desktop在您的~/.local/share/applications文件夹中为脚本创建一个文件(或在usr/share/applications系统范围内访问)。例如:

[Desktop Entry]
Name=My bash script
Comment=bash script to do custom stuff
Type=Application
Exec=/path/to/bash/script %U
Icon=/path/to/some/fancy/icon
Terminal=false (or true)
Categories=Other;
Run Code Online (Sandbox Code Playgroud)

它将显示在Other弹弓的类别中。运行它,然后在运行时选择“Keep in Dock”。