- Create a
*.desktop
file say as myscript.desktop
, add command parameters as you want. In this case your script commands.
See the below for more details on parameters of .desktop file.
- Test the launcher file (
myscript.desktop
) by double clicking, if working fine just drag myscript.desktop
file to launcher bar.
Example : a .desktop file containing following code will launch gedit in name of "My Editor"
[Desktop Entry]
Encoding=UTF-8
Name= My Editor
Comment=Edit text files
Exec=gedit
Terminal=false
Type=Application
Icon=/usr/share/pixmaps/debian-logo.png
Note: you can also modify some properties of .desktop file (like command to execute) by right clicking the .desktop file and then go to properties
For a detailed guide, see here