Re: [systemd-devel] diverting HandlePowerKey

2012-08-22 Thread Koen Kooi
Op 16 aug. 2012, om 16:37 heeft Lennart Poettering het volgende geschreven: > On Thu, 16.08.12 14:47, Mantas Mikulėnas (graw...@gmail.com) wrote: > >> On Thu, Aug 16, 2012 at 2:23 PM, Robin Becker wrote: >>> However, on my netbooks I like to use the power button to launch oblogout >>> which b

Re: [systemd-devel] diverting HandlePowerKey

2012-08-17 Thread Robin Becker
On 16/08/2012 18:36, Lennart Poettering wrote: .. Invoke the PowerOff() call on the org.freedesktop.login1.Manager interface of the /org/freedesktop/login1 object on the org.freedesktop.login1 service. Which is basically what "systemctl poweroff" does. thanks for this. I think my rout

Re: [systemd-devel] diverting HandlePowerKey

2012-08-16 Thread Lennart Poettering
On Thu, 16.08.12 16:27, Robin Becker (ro...@reportlab.com) wrote: > However, I'm a bit lost on what's the correct way for a user program > to signal that it wants to shut down etc. Slim appears to be running > polkit/consolekit so presumably I can use that, but is there a > preferred systemd appro

Re: [systemd-devel] diverting HandlePowerKey

2012-08-16 Thread Robin Becker
I don't get this. This "oblogout" thing is a graphical tool you spawn from the system level? Does that mean it runs privileged but accesses your unprivileged X session? That sounds wrong... If you have a graphical session then the graphical session should handle the power/sleep key

Re: [systemd-devel] diverting HandlePowerKey

2012-08-16 Thread Lennart Poettering
On Thu, 16.08.12 13:16, Robin Becker (ro...@reportlab.com) wrote: > On 16/08/2012 12:47, Mantas Mikulėnas wrote: > >On Thu, Aug 16, 2012 at 2:23 PM, Robin Becker wrote: > > > > >It'd be a bit better if the button/lid events were handled by a > >program running inside the Openbox session

Re: [systemd-devel] diverting HandlePowerKey

2012-08-16 Thread Lennart Poettering
On Thu, 16.08.12 14:47, Mantas Mikulėnas (graw...@gmail.com) wrote: > On Thu, Aug 16, 2012 at 2:23 PM, Robin Becker wrote: > > However, on my netbooks I like to use the power button to launch oblogout > > which brings up a bunch of buttons that allow me to > > logout/suspend/restart/halt etc etc.

Re: [systemd-devel] diverting HandlePowerKey

2012-08-16 Thread Lennart Poettering
On Thu, 16.08.12 12:23, Robin Becker (ro...@reportlab.com) wrote: > Hi, > > I liked the idea of systemd when I first saw it, but after doing a > few conversions I have some small issues. I run arch linux with slim > & openbox and that seems to be fully supported so far as I can tell. > > However

Re: [systemd-devel] diverting HandlePowerKey

2012-08-16 Thread Robin Becker
... Openbox is actually running as a user process so it has no greater rights than the user; that makes the use of a more capable daemon a bit more reasonable. No, if your action just runs `oblogout` (and possibly `systemctl suspend`), then the capabilities of a normal user are sufficient

Re: [systemd-devel] diverting HandlePowerKey

2012-08-16 Thread Robin Becker
On 16/08/2012 12:47, Mantas Mikulėnas wrote: On Thu, Aug 16, 2012 at 2:23 PM, Robin Becker wrote: It'd be a bit better if the button/lid events were handled by a program running inside the Openbox session (the events can be read from /run/acpid.socket). I'm not exactly sure here, bu

Re: [systemd-devel] diverting HandlePowerKey

2012-08-16 Thread Mantas Mikulėnas
On Thu, Aug 16, 2012 at 2:23 PM, Robin Becker wrote: > However, on my netbooks I like to use the power button to launch oblogout > which brings up a bunch of buttons that allow me to > logout/suspend/restart/halt etc etc. I can of course continue to use acpid > to handle the power button, but that

[systemd-devel] diverting HandlePowerKey

2012-08-16 Thread Robin Becker
Hi, I liked the idea of systemd when I first saw it, but after doing a few conversions I have some small issues. I run arch linux with slim & openbox and that seems to be fully supported so far as I can tell. However, on my netbooks I like to use the power button to launch oblogout which bri