Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What is the correct way (if possible distribution agnostic) to start application automatically in Linux (Debian Wheezy)? In need to know two things. How to autostart generally, so that the application runs in background even before I log in, and the userspecific autostart, meaning the application gets started as soon as the user logged in.

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

The standard way to start processes on system startup is using a script in /etc/init.d. There should be a template in the directory. These need to be linked to the appropriate /etc/rcX.d directories. man pages for the required command should be already installed.

upstart is newer way to get init to start a process when the server starts. If this is available the command man upstart should give you documentation.

Starting commands when you login can be done in your .profile. You will want to end the commands with a & so that they run in the background.

share|improve this answer
    
Depending on the shell, it is probably ~/.bash_profile, just to avoid any confusion for @DevNoob. BillThor has you off to a great start. –  nerdwaller Nov 20 '12 at 20:58
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.