I would write up the scripts as nerdtron notes, and then rather than double clicking the script itself set up a desktop configuration file to activate the script.
eg 1. In your /home/<username>/bin folder store the actual script that contains the start command and make it executable, for this example I'll name the first script "servod".
2. Open gedit and put the following in a file
Code:
[Desktop Entry]
Type=Application
Name=ServoBlaster
Comment=Start the servod script to run ServoBlaster.
Exec=servod
Icon=
Terminal=false
NoDisplay=true
3. Save the file /home/<your-username>/.local/share/applications/servoblaster.desktop and set it executable.
Right click > Properties > Permissions tab, tick the box at the bottom to set the executable bit.
Copy this launcher (.desktop file) to your desktop/panels/docks or wherever you want to place a launcher.
Note: the folder /home/<username>/bin is part of your system path, it will be included in the system path after a log out / log back in if it has just been newly created. So the "Exec=" line can contain just the script name without the complete (absolute) path.
Storing icons in your home folder in a ".icons" folder will allow you to hold custom icons which can be put in the Icon= line by name (include the file extension as well if you use a custom icons folder in your home directory).
I store all my custom launchers (.desktop configuration files) in the folder /home/<my username>/.local/share/applications. The "NoDisplay=true" entry keeps my custom launchers out of any system menus etc.
I then put a copy of the desktop configuration file on the Desktop or panels/docks etc for launching such custom scripts. It is simple to write a launcher to stop a process just by changing the Exec= line to a "killall command" and a few other of the descriptions/details to suit. Cheers.
Bookmarks