Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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 wrote a program in Bash, and now I want to run it on startup for all users so that nobody can cancel it, except for root. How can I do it?

share|improve this question

Maybe something like...

A question

How to run a script with the root rights (so only the root can stop it) on startup ?

Possible answers

A) The Upstart /1/ can run scripts/programs with root rights during the boot.

B) You could use existing scripts to start your own script. The Ubuntu Resolution wiki /2/ has an example how to set xrandr commands in kdm/gdm startup scripts.

Earlier(Kubuntu Forums): "FAQ: Autostart / Autorun, Periodic run" /3/.


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.