Re: [systemd-devel] suspend hook as user service

2017-02-20 Thread Michael Hirmke
Hi Simon, >On Fri, 17 Feb 2017 at 19:41:00 +0100, Michael Hirmke wrote: >> A much better approach is to write a script or program listening for the >> according signals "PrepareForSleep" and "PrepareForShutdown" on the dbus >> interface "org.freedesktop.login1". >This is the thing to do. It allow

Re: [systemd-devel] suspend hook as user service

2017-02-20 Thread Lennart Poettering
On Fri, 17.02.17 18:09, Reverend Homer (mk.43.e...@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 > ~/

Re: [systemd-devel] suspend hook as user service

2017-02-20 Thread Simon McVittie
On Fri, 17 Feb 2017 at 19:41:00 +0100, Michael Hirmke wrote: > A much better approach is to write a script or program listening for the > according signals "PrepareForSleep" and "PrepareForShutdown" on the dbus > interface "org.freedesktop.login1". This is the thing to do. It allows your program t

Re: [systemd-devel] suspend hook as user service

2017-02-18 Thread Michael Hirmke
Hi, >Hi Michael, >thank you for feedback, but you described *system* service and this is the >way I solved my issue for now. The original message was about *user* service >? the service that you can put at $HOME/.config/systemd/user and activate >with: uhm, I understood that you just wanted to h

Re: [systemd-devel] suspend hook as user service

2017-02-18 Thread Reverend Homer
Hi Michael, thank you for feedback, but you described *system* service and this is the way I solved my issue for now. The original message was about *user* service — the service that you can put at $HOME/.config/systemd/user and activate with: systemctl --user enable myservice.service R.H. On F

Re: [systemd-devel] suspend hook as user service

2017-02-17 Thread Michael Hirmke
Hi, >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 yes, but they also describe, how you can add a system service handling special user things. [...] You can create a service named for e

[systemd-devel] suspend hook as user service

2017-02-17 Thread Reverend Homer
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. R.H. [1] https://wi