Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

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]
Type=Application
Exec=python /full/path/to/script/script.py
Icon=/path/to/icon # only if needed
Name=Name of script
Terminal=true

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
add comment

Your Answer

 
discard

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.