3

To execute a script, I have to:

  1. Write the script
  2. Make it executable
  3. Double click it, which shows this window:

    enter image description here

  4. Click the "Run" button.


How can I execute the script directly, without showing the dialog?

marked as duplicate by kiri, Seth, karel, jobin, Mitch Feb 23 '14 at 12:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • please stop editing question so fast – Registered User Jan 28 '14 at 6:17
  • @adityapatil I just want to make the question as clear as possible and refine it to help who wanna answering me – Maythux Jan 28 '14 at 6:23
2

GUI

Depending on which Ubuntu version you have,

  • Before 13.04

    In Nautilus, go to this menu:

    Edit → Preferences

  • 13.04 and later

    In Nautilus, go to this menu:

    Files → Preferences

Then,

in the 'Behaviour' tab, enable "Run executable text files with they are opened"

enter image description here


Command line

If you prefer a command:

dconf write /org/gnome/nautilus/preferences/executable-text-activation "'launch'"

Note: Both GUI and command line methods work only for Nautilus (the default graphical file manager in Ubuntu)

  • In 12.10,for nautilus it's edit->preferences->behaviour – Registered User Jan 28 '14 at 6:15
  • Ok got it... But it's Edit->prefernces->behaviour – Maythux Jan 28 '14 at 6:18
  • @minerz029 Ok friend i think that's it thanks – Maythux Jan 28 '14 at 6:24
  • @minerz029 This answer is only relative to nautilus(that is fine for 99% cases). Can we do the same with CLI. That would be more appropriate as it won't be file manager based. – Registered User Jan 28 '14 at 6:27
  • 1
    @adityapatil: All methods, both GUI and CLI, will be only for a specific file manager. I've added a command for completeness, however it only works for nautilus. – kiri Jan 28 '14 at 9:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.