Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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

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.