6

I am using Elementary OS Freya.
I want to add custom bash script to plank (dock).

How can I do it ?

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
WebOrCode
  • 169
  • 1
  • 5

2 Answers2

5

Create a .desktop file in your ~/.local/share/applications folder for the script (or in usr/share/applications for system wide access). E.g.:

[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;

It will show up in the Other category for slingshot. Run it and then select "Keep in dock" when it is running.

chaos
  • 47,463
  • 11
  • 118
  • 144
user124853
  • 51
  • 1
-2

to save the .desktop file you have to add in Terminal:

sudo chmod 777 programName.desktop
Jarold
  • 21
  • 5