Linux – How to make it so bash runs instead of asking where to run upon selection from file navigator


When I double-click on bash files on Linux Mint a pop-up appears querying whether I want to run in terminal, display, run, or cancel. I was wondering, how do I make it so for this particular bash file it runs without this pop-up (preferably without the presentation of the terminal). Any help would be much appreciated!

Best Answer

You can't do it with the bash script directly, you will need to create a .desktop file for it instead. For example, if your bash script is saved as /home/cenoc/bin/, create a file called script.desktop with the following contents:

[Desktop Entry]
Name=My script
Comment=Describe your script here

Then, double click on script.desktop and your script should be executed.