[systemd-devel] systemctl --user on RHEL -- is this a bad idea

Jeff Solomon jsolomon8080 at gmail.com
Wed Nov 8 01:33:50 UTC 2017


Hi,

I would like to use a user service (systemctl --user) with systemd on RHEL7
where it has been deliberately removed.

I've communicated with the RH dev who made this change who reported that I
could restore the /lib/systemd/system/user at .service file and mostly
everything would work.

I don't care about having the user service exist only when the user is
logged in, as I will enable lingering on the service and I want it to be
running from boot to shutdown.

I've found that I can run:

    systemctl start user at foo

to start the foo user's service and that works, but on other systems
(Ubuntu) where user services are officially supported, the user service is
automatically started when I run:

  loginctl enable-linger foo

whereas on RHEL, running this command does not start the service.

I can imagine writing a tiny additional service on RHEL that will start the
user service using:

    ExecStart=/usr/bin/systemctl start user at foo

but I'd rather make lingering officially work on RHEL to the extent that
that is possible.

Two questions:

1) Any idea how to make lingering work such that the user service is
started automatically on reboot

2) Is it a really dumb idea to try to make this work on RHEL7?

Thanks!

Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20171107/42434690/attachment.html>


More information about the systemd-devel mailing list