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

This question already has an answer here:

First, I know that this has been asked before. Tried guides, didn't work...

So I have a python script that has a never ending loop. It accesses the internet.

All I want to do is that after I log in or the computer start, this python script is executed in the background until I shut down the computer.

Let's say my script is currently in my home directory named

How could I achieve this task in ubuntu 12.10?

Thank you for your answer

share|improve this question

marked as duplicate by Takkat, Florian Diesch, vasa1, Eliah Kagan, qbi Feb 25 '13 at 13:19

This question was marked as an exact duplicate of an existing question.

In the answer I linked to above you want to add the following command in the .desktop file Exec= field to run your script python /path/to/ – Takkat Feb 25 '13 at 10:45
@Aditya: the one you linked is running scripts at boot, the one I linked is running scripts at login - this is a different thing, I dont think they should be duped. – Takkat Feb 25 '13 at 11:52

"Add to Startup" program is available in Ubuntu. You can use the same to achieve this.

Here is an article where I explained how to add a file to start up in details.

share|improve this answer

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