how to prevent standby during critical operations on linux
- From: frm <francesco montorsi gmail com>
- To: gtk-app-devel-list gnome org
- Subject: how to prevent standby during critical operations on linux
- Date: Mon, 5 Apr 2010 02:46:05 -0700 (PDT)
I've written an application based on GTK (which loads some gnome libs
dynamically to avoid static linker dependencies) which needs to perform an
important operation which cannot be interrupted by e.g. automatic standby
because of user inactivity.
I'd like to know how to tell the OS or maybe the power-manager daemon that
during that critical operation automatic standby should be disabled... on
Windows I'm using the SetThreadExecutionState() API (see
On linux it seems much more messy the situation. From what I've learned, it
seems I should use DBus (is there some GTK api to do it easily?) to contact
either HAL (which seems deprecated) or DeviceKit-power (for which I cannot
find any documentation; the page
http://www.freedesktop.org/wiki/Software/DeviceKit doesn't help a lot).
What do you suggest?
Is there some simple example code for using DBus+DeviceKit-power from a GTK
Thanks for any hints!
View this message in context:
Sent from the Gtk+ - Apps Dev mailing list archive at Nabble.com.
] [Thread Prev