I need to be able to execute an executable shell script (sh) with a double click. I set the executable flag on the permissions for the file, and yet when I double click on it, it opens in a text editor. I do not have any options in my UI under the files properties menu to use a custom command or anything. It only lists various applications which are installed. I just want it to execute, nothing more. How can I accomplish this?
How to launch shell script with double click in CentOS 7
shell script;desktop;icons
To run your script by double clicking on its icon, you will need to create a .desktop file for it:[Desktop Entry]Name=My scriptComment=Test hello world scriptExec=/home/user/yourscript.shIcon=/home/user/youricon.pngTerminal=falseType=ApplicationSave the above as a file on your Desktop with a .desktop extension. Change /home/user/yourscript.sh and /home/user/youricon.gif to the paths of your script and whichever icon you want it to have respectively and then you'll be able to launch by double clicking it.