I would like the users of the system to be able to setup processes that run at system startup that they can setup by themselves. How may I do it?

link|improve this question

40% accept rate
Can you elaborate? Do you actually mean when the system is powered on, or do you mean when the user logs in. Will the users have admin access to the system? Will the users be able to specify any process they want. If they aren't admins and can select any process they want are you willing to accept the risk that they may compromise the security of the system? – Zoredache Mar 25 '10 at 22:00
feedback

3 Answers

up vote 1 down vote accepted

A user can specify a script to run on boot via cron. In their crontab (edited by executing 'crontab -e' when logged in), they would specify:

@reboot /home/username/path/to/script.sh
link|improve this answer
feedback

Ask them to add it to rc.local ?

link|improve this answer
That will not work as rc.local can only be edited by root – Eduardo Mar 25 '10 at 23:18
on a regular system yes, but on his, users are encouraged to add there own processes at startup – Marcel Mar 25 '10 at 23:24
feedback

Write your own rc.local script to check every user $HOME/rc.local. Then, use su to execute that command under the user account.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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