how to run a bash script by double clicking code example
Example: how to execute a file in ubuntu by double click
#For nautilus, execute in terminal:
gsettings set org.gnome.nautilus.preferences executable-text-activation 'launch'
#Note: The file should be executable. You may also need to change permission of file. Right click and set "Allow executing file as program"