Executable shell scripts open in Gedit on Ubuntu
This started happening after an upgrade to Ubuntu 13.04. We have shell scripts here and there saved as .run files, e.g. Build.linux.auto.run
, to automate AVBlocks builds on Linux. Normally Nautilus will ask you whether you want to run the script when you double click a .run
file, but on Ubuntu 13.04, Nautilus suddenly started opening .run
files in Gedit. It turns out there is a setting in Gnome for that. Here is how to fix it:
- Run
dconf-editor
and navigate toorg.gnome.nautilus.preferences
- Change the value of the
executable-text-activation
setting fromdisplay
toask
.
If you do not have dconf-editor
you can install these packages:
And just in case, this is how you run it: