When double-clicking a Bash or Python script on Ubuntu, the file manager (Nautilus) will ask you in a pop up window if you want to run the script or view its contents. The pop up window is similar to this one:

If you find this behavior annoying or a waste of time, there is a simple solution that can help you execute the script directly, no need to pass through the annoying pop up window. Here are the instructions:

1. Under Ubuntu, launch the Terminal and run this command:


2. Navigate to the following path:

apps > nautilus > preferences

3. On the right side of the window, locate this entry:


4. Double-click it and replace "ask" with this value, then click OK:


4. From now on, every time you run a bash or Python script, it will be executed at once, no pop up window will appear! You can also do these modifications via the Terminal by running this command:

gconftool-2 --type string --set /apps/nautilus/preferences/executable_text_activation launch

To restore the default option, use this command:

gconftool-2 --type string --set /apps/nautilus/preferences/executable_text_activation ask

That's it!

Note: The Nautilus file manager for GNOME must be installed on Ubuntu to be able to apply this tutorial!

Post a Comment