I added #!/usr/bin/env python to the script and chmod +x in terminal, but on double clicking it still asks for these 4 options.

I want it to automatically open in terminal. Is it possible? I'm using Ubuntu 12.10.


You can change this behavior in the preferences of Nautilus (Files in the dash).

On the tab Behavior under Executable Text Files.

Files Preferences

Note this changes the behavior for all excutable text files.

| improve this answer | |

You may want to define a .desktop file to run your python application in a terminal on double click on this .desktop file.

This would be a basic content needed:

[Desktop Entry]
Exec=python /full/path/to/script/script.py
Icon=/path/to/icon # only if needed
Name=Name of script

Save this anywhere (putting in ~/.local/share/applications/ will also make it executable from the Dash etc.) as name-of-script.desktop and give it executable permission.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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