Ubuntu – How to run executable scripts in Nautilus

execute-commandnautilus

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?

Best Answer

  1. Open Nautilus.

  2. Open this from the menu bar:

    Edit → Preferences

  3. Select the 'Behavior' tab.

  4. Select "Ask each time" under "Executable Text Files".

  5. Close the window.
  6. Right click the file, and select "Properties.
  7. Select the "Permissions" tab, and make sure "Allow executing file as program" is selected.

  8. Close the window.

Now you can double-click your executable text file in Nautilus to be asked whether to execute or edit your script.

enter image description here


Answer credit: Nur

Related Question