Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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.

share|improve this question

2 Answers 2

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/
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.

share|improve this answer
Thanks guys; that worked perfectly! – Cadogen West May 11 '13 at 9:42

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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