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 have a Python script which I would like to execute at every startup. I can run it by adding this to the startup applications:

python3 /path/to/

That works, but it doesn't open a terminal window, so I can't see the program's output. How could I make it open a terminal window and execute the script in there?

Note: I get the window to stay open with input(' ') at the end of the Python script. Thanks!

share|improve this question
up vote 3 down vote accepted

This one should work:

gnome-terminal -e "python3 /path/to/"
share|improve this answer
Thank you very much! This works perfectly. Just out of interest - do you have any idea how you would do something similar on Windows7? – Sean Sep 29 '13 at 18:17
Try start cmd /k python3 X:\path\to\ – the_Seppi Sep 29 '13 at 20:07

To run an application in a system's default terminal we may define a .desktop file we can then add to our startup applications in ~/.config/autostart with the following content:

[Desktop Entry]
Name=Name of Application
Exec=python3 path/to/

Note that the terminal will close on termination of our script only if our terminal profile is set to do so (default in gnome-terminal but editable from profile settings).

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.