You are not logged in.
This is my first time posting here, I installed arch last week and have been able to firgure almost everything out. The wiki pages (very well written) and the forums have been a big help. However this is one question that I haven't been able to find the answer to.
"How do I start a process or script as a user other then root at boot?"
My guess is my inability to find an answer is mostly from my relitivly small understanding of bash scripting. If someone could point me to a guide or write down an example themselves I would greatly apriceate it.
Thank you,
Tim
Edit: spelling
Last edited by tpolich (2009-08-07 05:26:36)
Offline
su -l -c "some-command-or-other" username
in /etc/rc.local
Offline
wow, I feel kind of silly now. Thank you for the fast response. I can't belive I forgot about the su command, I came from ubuntu and never really had a need for it just used sudo.
One more quick question, is rc.local run the backround or say if I asked for input would the system boot hang?
Offline
One more quick question, is rc.local run the backround or say if I asked for input would the system boot hang?
Yes, rc.local itself would hang, but if you background the process inside rc.local using the '&' symbol at the end of the command, then that command will be backgrounded and rc.local can continue.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
"Hang" could be misleading. I believe that input would be requested, and could be provided. So yes, it would hang in the sense of wait for input. It wouldn't crash or get into a state from which it could't continue (after input is provided). You could also put a timeout on your "read" command.
Offline
Yes, true... I was thinking 'hang' as in stop processing pending that input. Good point through
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline