I have a bash script that has permission to execute, but when I double click it in nautilus it won't execute, instead it opens as text in gedit
.
In properties it says open with: gedit
, and that doesn't change when I click the reset
button.
What do I have to do to make it execute? I'm running Ubuntu 13.04. I never had an issue like this one with 12.04 or with any other distribution in general.
EDIT
If I go in terminal and type: ./bashscriptname
it runs just fine.
Go to File → Preferences (in Ubuntu 14.04, you might find it under Edit → Preferences).
Go to the Behavior tab and click on Run executable text files when they are opened.
Or, choose Ask each time to be prompted every time you double click.
As mentioned in this blog post here,
Open file explorer
Files
. Press Alt+F10 and selectPreferences
. It should show something like thisIn the
Behavior
tab, selectAsk each time
and close it. By default, it will be inView executable text files when they are opened
. Now whenever you double click on a shell script, it will ask you what to do. If you want to straight away execute the script, select the first optionRun executable text files when they are opened