I want to run a script as root when the computer starts. This was earlier done in rc.local, but not anymore.
What I've tried:
- putting the script in
/etc/profile.d - adding the
/pathto/script.shin/etc/profile - added
/pathto/script.sh &in/etc/xdg/openbox/autostart
The script is for setting things powertop recommends; the script works just fine when I run sudo /pathto/script.sh.
/etc/profile*is run when a user (and any and every user) logs in, not when the system boots./etc/rc.localwould be the right place. Why not keep it there? Why involve Openbox, which is not started when the computer starts but only if someone logs in and chooses that as their window manager?