[systemd-devel] suspend hook as user service

Lennart Poettering lennart at poettering.net
Mon Feb 20 16:58:29 UTC 2017


On Fri, 17.02.17 18:09, Reverend Homer (mk.43.ecko at gmail.com) wrote:

> Hi,
> 
> is there any way to start user service before/after suspend.target? In
> wiki.archlinux.org there are only system sleep hooks [1]. I tried to lock the
> screen before suspend and put the service inspired by [2] in
> ~/.config/systemd/user/. But this service just did not start.

Use inhibitor locks:

https://www.freedesktop.org/wiki/Software/systemd/inhibit/

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list