Re: [systemd-devel] Perl Net::DBus, org.freedesktop.system1 and inhibitor locks

2016-05-26 Thread Michael Hirmke
Hi Lennart, >On Wed, 25.05.16 18:13, Michael Hirmke (m...@mike.franken.de) wrote: [...] >> Sorry, I forgot to add information regarding my environment. >> I use openSuSE Leap 42.1 with a Plasma 5 desktop. >I don't know if KDE respects these advisory locks and shows them in >the UI, or does not.

Re: [systemd-devel] Perl Net::DBus, org.freedesktop.system1 and inhibitor locks

2016-05-25 Thread Michael Hirmke
Hi Mantas, >In other words, mixing up OS file descriptors and Perl file handles? exactly 8-< >D-Bus can only send and receive raw FDs; Net::DBus doesn't know what kind >of handle it's supposed to be, so you need to either create one manually, >or just work with the FD directly (I think the

Re: [systemd-devel] Perl Net::DBus, org.freedesktop.system1 and inhibitor locks

2016-05-25 Thread Mantas Mikulėnas
In other words, mixing up OS file descriptors and Perl file handles? D-Bus can only send and receive raw FDs; Net::DBus doesn't know what kind of handle it's supposed to be, so you need to either create one manually, or just work with the FD directly (I think the relevant function is

Re: [systemd-devel] Perl Net::DBus, org.freedesktop.system1 and inhibitor locks

2016-05-25 Thread Michael Hirmke
Hi again, [...] >>> - I am not able to close the file descriptor in the pre block of the >>> signal handler. Whenever I try, I get an error, that the descriptor >>> is closed. >>This suggests something else closed the fd for you? >Yes, but who or what might that be? >As I wrote above - at

Re: [systemd-devel] Perl Net::DBus, org.freedesktop.system1 and inhibitor locks

2016-05-25 Thread Michael Hirmke
Hi Lennart, thx for your answer! [...] >Being just advisory means that a user can shut down the system even if >a lock is taken, however, the lock is tracked and the expectation is >that the DE of your choice will still show them first, and ask for >confirmation to ignore them before you

Re: [systemd-devel] Perl Net::DBus, org.freedesktop.system1 and inhibitor locks

2016-05-25 Thread Lennart Poettering
On Wed, 25.05.16 12:17, Michael Hirmke (m...@mike.franken.de) wrote: > Hi *, > > I'd like to write a script, which can listen to the PepareForSleep > signal from systemd-logind. When it catches the signal, it should do a > few things in the context of the user. While doing this, it should >