how to prevent standby during critical operations on linux

Hi all,
    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 doesn't help a lot).

What do you suggest? 
Is there some simple example code for using DBus+DeviceKit-power from a GTK
app somewhere? 

Thanks for any hints!
Francesco Montorsi

View this message in context:
Sent from the Gtk+ - Apps Dev mailing list archive at

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]