How do I run executable scripts in Nautilus?
When I double-click on a script in Nautilus to run it, the script just opens in my text editor with no option to run it. Using Nautilus, how do I run executable text files and/or scripts?
Open Nautilus.
-
Open this from the menu bar:
Edit → Preferences
Select the 'Behavior' tab.
Select "Ask each time" under "Executable Text Files".
- Close the window.
- Right click the file, and select "Properties.
Select the "Permissions" tab, and make sure "Allow executing file as program" is selected.
Close the window.
Now you can double-click your executable text file in Nautilus to be asked whether to execute or edit your script.
Answer credit: Nur
Follow these steps:
- Install
dconf-editor
because it isn't installed by default. - Hit Alt+F2, type
dconf-editor
and hit Enter. -
In
dconfg-editor
goto:org
➤gnome
➤nautilus
➤preferences
-
Click on
executable-text-activation
and from drop down menu select:launch: to launch scripts as programs.
OR
ask: to ask what to do via a dialog.
Close
dconf-editor
. That's it!