[systemd-devel] Forward systemd's sleep.target to a systemd user session
lennart at poettering.net
Mon Jul 15 16:19:18 PDT 2013
On Sun, 14.07.13 08:59, Jörg Thalheim (joerg at higgsboson.tk) wrote:
> Am 12.07.2013 00:51, schrieb Lennart Poettering:
> > On Wed, 10.07.13 21:04, Jörg Thalheim (joerg at higgsboson.tk) wrote:
> >> How I can trigger sleep.target in systemd --user session?
> > What precisely are you trying to do with this?
> >> My use case is to logout my jabber client before suspend (I hope this
> >> does not sounds to trivial compared to your serious problems, but you
> >> might come up with other use cases).
> > It's probably a better idea to patch the client to use a delay inhibitor
> > for this:
> > http://www.freedesktop.org/wiki/Software/systemd/inhibit/
> Inhibitor locks seams to be the perfect answer.
> Is "systemd --user" aware of this feature?
No. The inhibitor lock stuff is an API for programs to use, regardless
of user apps or system services.
> It would be useful to spawn a service/unit before suspend/shutdown.
Well, this is not supported and is much nastier than it sounds due to
the security issues related to allowing user processes to block
suspend. We cannot allow this undefinitely to normal users. The
inhibition stuff for delay blockers cares for all that, but it is an
API, not something you can use to run arbitrary processes then.
There's currently no nice solution for your problem I fear.
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel