Re: How to run services as a user?
Reply #5 –
If you do not opt for the userservd configuration, then you can do it by creating a user ran instance of dinit,
type = process
command = dinit -e <your-env-vars-dir>
smooth-recovery = true
logfile = /var/log/dinit/user-suite.log
waits-for = elogind
waits-for = tmpfs
run-as = <user>
Add this service to your dinit service files and enable it. Your user services may then be placed in ".config/dinit.d" (or wherever you want it to point to). Create a "boot.d" sub-directory and soft-link the services in the first directory to the boot.d directory for user service to start at boot.
Open to any suggestions to improve this.