[systemd-devel] user startable services in systemd context
Lennart Poettering
lennart at poettering.net
Tue Apr 19 16:58:36 PDT 2011
On Thu, 07.04.11 14:55, Marius Tolzmann (tolzmann at molgen.mpg.de) wrote:
Heya,
> we have a setup where every user can start its own services
> (e.g. a webserver, database server, whatever).
>
> if the user wants this service to be started after a reboot he just
> tells us the name of its startup files and we add those to our startup
> system. The service is then started with user privileges.
>
> the user is able to stop and start the service any time..
>
> is there a way this kind of setup can be configured in systemd?
In the long run systemd --user is what you want to be use, but that's
not ready yet. systemd for the user is something we want to focus on for
the F16 cycle. While the basics are there it is not round and shiny yet.
You could hack something up with a service like systemd at .service which
would be something like:
<snip>
[Service]
User=%i
PAMName=systemd
ExecStart=/bin/systemd --user
</snip>
Then you can simply link this into
/etc/systemd/system/multi-user.target/systemd at lennart.service and the
user "lennart" would get his very own systemd instance run at boot, with
config files from ~lennart/.config/systemd/user/... They can access this
via "systemctl --user" and similar.
We eventually plan to ship a unit like this by default, but we first
have to figure out a couple of details.
Sorry, if this is a bit disappointing. This is definitely on our todo
list, but right now we can just offer you the building blocks, not the
product itself yet.
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list