but when I try to enable it I get the following error:
osmc@osmc:/etc/systemd/user$ sudo systemctl --user enable rt
Failed to get D-Bus connection: Connessione rifiutata
Any ideas on how to fix this or have a simpler/better alternative means of restarting rtorrent after every reboot by the user osmc ? FWIW if I define rt.service as a SYSTEM service it starts allright but owned by root (which I want to avoid).
For the time being as a stopgap measure I have a start|stop type script which I manually launch from osmc home but of course this will not be launched if the system goes down and then reboots.
There’s no need to try to make it it a “user service”. Just specific User=osmc, Group=osmc in the service. Here’s an example from our transmission service:
Thank you very much. FWIW here is the /etc/systemd/systm/rt.service file to have rtorrent started at boot time on behalf of regular user osmc (tested working)
Even 7 years later the question is relevant (although it’s a bit more related to systemd in general than to OSMC itself). Although I did not find a way to run user services in OSMC documented anywhere else.