You are not logged in.
Hi,
I want to be able to run a command at system startup as an ordinary, non-priveledged user. In FreeBSD (where I came from before coming to Arch), there is a @reboot directive in crontab, allowing me to set up command in my crontab file to be run at startup, just as any other cronjob (only at startup instead of at a specific time).
The cron that comes with Arch doesn't seem to support the @reboot directive. Is there another simple mechanisms available for ordnary users?
Svein Halvor
Last edited by sveinhal (2008-12-03 22:31:52)
Offline
something like your .xinitrc? or session start from your desktop? or maybe `/bin/su freak -l -c <some programm>` in a daemon-script?
Offline
i use fcron as a replacement for cron; it allows running jobs as users and/or @boot, it's in the repos.
$ sudo pacman -S fcron
-- read manpage for @boot option --
$ sudo fcrontab -u USERNAME -e
Last edited by brisbin33 (2008-12-03 22:42:07)
//github/
Offline
There's a few things you could do. I run all my startup apps in my xinitrc and the like, so I don't need functionality like this.
Possibility 1: Create a "framework" for this. In /etc/rc.local, add something like:
cd /home
for user in *; do
if [ -x "/home/$user/.rc.local" ]; then
su $user -c "/home/$user/.rc.local"
fi
done
Alternatively do the same thing for rc.shutdown.local
Possibility 2: Use a different cron. I think we have 3 floating around somewhere. If not feel free to package one that works to your liking and stick it in the AUR
Possibility 3: Create an /etc/rc.d/ script that drops privileges to your user and runs all the apps you need
... there's lots more I'm sure ...
Offline