You didn't indicate what kind of application you want to run, console application, daemon, KDE, X windows application. You also need to consider when you want it to run, and for who.
If it is a daemon, under which run levels do you want it to run? Here slackware may be different then Red Hat linux. Red Hat, Mandrake, Suse and others place startup scripts in /etc/rc.d and links to them in /etc/rc.<run level>/ with a name following the pattern S<#>name and K<#>name where the number indicates the order (alphabetic) that a service should start. The K script is for killing the script.
If it is a KDE application, there is a KDE startup program where you would place a link to the application. Do you want the application to run whenever you log in?
Or if it is a console application that you want to run whenever you want to log in, then your ~/.bash_login script may be a better choice. Of course you may use a different shell, or you may wish the application to run for everyone logging in regardless of whether the use the Bash shell or the Csh. In that case a shell startup script that both execute for log-in may be better (One of the profile scripts). The .bashrc runs everytime the shell is opened and so is better for bash specific options set each time someone opens the bash shell.
There is a X-windows startup script that will execute regardless of which windows manager you use, that you could use for X apps.
Just to recap, you need to consider the user scope, runlevels, and program type to determine how the program or service should be started.
Last edited by jschiwal; 09-04-2004 at 02:02 PM.
|