Re: how to prevent standby during critical operations on linux



On Mon, Apr 5, 2010 at 5:46 AM, frm <francesco montorsi gmail com> wrote:

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
http://msdn.microsoft.com/en-us/library/aa373208(VS.85).aspx).

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
app somewhere?

http://people.gnome.org/~mccann/gnome-session/docs/gnome-session.html#org.gnome.SessionManager.Inhibit
is probably what you're looking for on GNOME.

-A. Walton.

Thanks for any hints!
Francesco Montorsi




--
View this message in context: 
http://old.nabble.com/how-to-prevent-standby-during-critical-operations-on-linux-tp28138463p28138463.html
Sent from the Gtk+ - Apps Dev mailing list archive at Nabble.com.

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




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