You are not logged in.
Hi all,
I would like to launch a script when the xfce power manager detects no activity for some time, before it goes to suspend (or whatever one has defined).
My needs are :
1) To check the activity rate of my PC and reset the power manager timer - For example, when I perform heavy calculation, I don't want my PC to go to suspend after 15', which is the time I parameterized my xfce power manager.
2) If I really have no activity, take the opportunity to perform some automatized maintenance tasks of my own.
So my questions are :
i) How to hook the power manager ? Possibly a script exist for it, but I have not found it in the documentation.
ii) How to reset the xfce power manage timer ? There may exist a dedicated feature for that. Otherwise, I may emulate a mouse move with cnee.
It seems that something exist (http://goodies.xfce.org/projects/applic … 1239402743)
and it provides the inhibit interface which allows applications to prevent automatic sleep actions via the power manager
But I have not found any explanation, nor howto. There might be some way to add some process in some inhibit list ?
Offline
If you are willing to dig into D-Bus, dbus-send etc., there is a way.
However, the most painless way to achieve this is to write a python program:
- You get to know if inhibition changes from some other program
- You can inhibit (lock) and de-inhibit in your program
- But you can't get a callback from power manager where it asks you if you think its OK to go to sleep/hibernate and your nay-saying is honoured.
Offline
Thanks for your answer.
If you are willing to dig into D-Bus, dbus-send etc., there is a way.
Too geek for me. However, I could not find the documentation for the "xfce power manager" dbus interface. I would have expected a link in the power manager page : http://goodies.xfce.org/projects/applic … 1239402743.
- But you can't get a callback from power manager where it asks you if you think its OK to go to sleep/hibernate and your nay-saying is honoured.
:-( Too sad !
Offline
[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 522.76 KiB (Peak: 529.61 KiB) ]