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?
|
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 Hit Alt+F2, type In
Click on launch: to launch scripts as programs. OR ask: to ask what to do via a dialog. Close |
|||||||||||||||||
|
|
I think this is a nuisance caused by Gnome people who decided to change that default behavior we were accustomed to. To fix it, you can;
If you want the same Nautilus behavior as Root as well you can repeat the steps above, starting dconf Editor this time as Root. |
||||
|
|
|
in a terminal
|
|||||
|
Change Nautilus' Behavior with Executable Text FilesOpen Nautilus
Double-click your Executable Text File in NautilusVoila! Answer credit: Nur, Jorge Castro |
|||||
|
GUI
Command lineIf you prefer a command:
Note: Both GUI and command line methods work only for Nautilus (the default graphical file manager in Ubuntu) Originally from another answer posted by me here. |
|||||||||
|
|
You can do this for a single file by going into permissions in file properties and selecting "run this file as an executable".
|
||||
|
|
|
For that I guess the best way will be to make .desktop launcher, make that launcher executable using
And after that you will be ready to run it via just clicking, and even more you can add it to launcher. To read more about how to make .desktop files look here. Main part of it is this [Desktop Entry] Type=Application Terminal=false Icon=/path/to/icon/icon.svg Name=give-name-here Exec=/path/to/file/executable |
||||
|
|
|
You can use the most upvoted answer in Fedora 20 + GNOME too:
|
|||
|
|
|
You have to check 3 points :
|
||||
|
|
|
right click on the file -> open with -> other application -> view all applications -> run software -> select from now on shell scripts will be run on double click. |
|||
|
|
|
|||||
|




