I have a shortcut to a shell script on my desktop, and when i double click it the run in terminal/display/cancel/run dialog appears. Is there any way to set a default action for this dialog?
1 Answer
I would suggest you create a desktop launch icon for the file. Here is how:
- Make sure your file is an executable, e.g.
chmod 755 myScript.sh
- Create a file on your desktop called
myscript.desktop
. The .desktop extension is important. Open the file in your favorite text editor and append the following text:
[Desktop Entry] Name=myScript Comment=Some Comment TryExec=/path/to/the/script Exec=/path/to/the/script Icon=/path/to/icon/if/you/wish Categories=Multimedia; Terminal=false Type=Application StartupNotify=true
- Now, right click on the file -> Properties -> Permissions: Check Execute: Allow executing file as program.
Now, you would have a launcher on your desktop with an icon and everything. If you want Unity Dash to find it, just drop a copy of the file in /usr/share/applications/