Re: [systemd-devel] what is the best way to connect to another user's service (when root)?

2017-11-24 Thread Jeff Solomon
On the one hand, I understand your point. On the other hand, there are three other ways of doing this: systemd-run -t --setenv=XDG_RUNTIME_DIR=/run/user/ --uid= systemctl --user ... su -l -c "XDG_RUNTIME_DIR=/run/user/ systemctl --user" machinectl --uid= shell /bin/systemctl --user

Re: [systemd-devel] what is the best way to connect to another user's service (when root)?

2017-11-24 Thread Lennart Poettering
On Do, 23.11.17 22:56, Jeff Solomon (jsolomon8...@gmail.com) wrote: > Hi, > > More questions about the systemd user service. > > Inside a script running as root, I want to control another user's service. > > I have found two ways to do this: > > systemd-run -t

[systemd-devel] what is the best way to connect to another user's service (when root)?

2017-11-23 Thread Jeff Solomon
Hi, More questions about the systemd user service. Inside a script running as root, I want to control another user's service. I have found two ways to do this: systemd-run -t --setenv=XDG_RUNTIME_DIR=/run/user/ --uid= systemctl --user ... or: su -l -c "XDG_RUNTIME_DIR=/run/user/