Home » Questions » Computers [ Ask a new question ]

Starting a linux process in the background

Starting a linux process in the background

I'm trying to create a script which starts some programs

Asked by: Guest | Views: 332
Total answers/comments: 3
Guest [Entry]

"When the shell that runs the script exits, it send a HUP signal to the processes you started. If those don't catch the signal, they will terminate. So whether just using & is sufficient depends on the application. To be safe, use nohup like that:

nohup your-program >>/dev/null 2>>/dev/null &

See the man pages for nohup and kill for more details or read the wikipedia article about nohup."
Guest [Entry]

Based on the example programs you gave, it looks like you're trying to start some programs when KDE launches. If so, take a look at KDE's Autostart feature. This article discusses more and gives instructions about how to add programs to autostart.
Guest [Entry]

Another option would be to start the process as a daemon, using /sbin/start-stop-daemon