[SOLVED] Auto run user service on boot without login
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi everybody. Newbie is here. I recently switched to Slackware on my Intel NUC. This little PC serves me as 24/7 uptime syncthing client and backup storage. So it's really important for me to have it constantly turned on with syncthing service running. Sometimes electricity problems appear. My UPS has only ~5 min battery charge (it's quite new). In such cases NUC turns off due to lack of power. Anyway i have a little trick how to turn it on remotely (my family), but in this case i get running NUC without syncthing service. As far as i know run syncthing as root is not a right thing. It has write permissions and things can go bad. I'm wondering is there any way to run user service that starts on boot without user login? I found some info about runuser and test it a little
I'm going to put this command to /etc/rc.d/rc.local. Still i have some doubts about if i'm doing it correctly. I know that systemd has some sort of implementations of user services that run on boot without user login. Do we have something similar in Slackware?
usually you can specify a user id to be used by a service. The service itself will be started by root, but will be run as the specified user.
Unfortunately I don't know this service, so I have no idea how can it be configured.
Yeah, now i realize what mistake i made when i tried to run system wide service as root for the first time. I completely forgot about permissions. I just copied my old .config/syncthing to /var/lib/syncthing/config. Now it works after recursive changing permissions of /var/lib/syncthing/config to syncthing:syncthing and moving actual syncthing folder to accessible place. The service starts syncthing as syncthing user.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.