I disagree with you Simon. The fact that it is not interactive is a
reason *supporting* adding this code. If things are interactive then the
machine will not suspend. It is when the machine is doing something but
is not actively being interacted with by the user that we need to
prevent the machine from thinking that it isn't "in use".
I agree with Sebastian that the best solution for me is to add the line
to my scripts. I think, conceptually, that the code should be in the
encoder. Fundamentally, the machine _is_ doing something. One leaves the
machine encoding 100 CDs and you come back 10 minutes later to find it
has gone to sleep because it wasn't "being used".
The code could be added as an optional dependency:
Add a little few lines of code in configure.in;
dbus_version=`pkg-config --modversion dbus-1`
And then we can check the value of dbus_version, and if high enough we
can define the config.h variable USE_DBUS.
In this way we can surround the #include <dbus/foo.h> and dbus_bar in
pre-processor ifdef tags, for example:
#include "config.h"
#include <string.h>
#ifdef USE_DBUS
#include <dbus/foo.h>
#endif
int main
{
#ifdef USE_DBUS
dbus_g_proxy_set_interface (foo, bar);
#else
g_print ("DBUS support not present");
#endif
}
so that if you compile the package without dbus installed, then the dbus
stuff isn't available, but if you have it, it enables it automatically.
--
Inhibit Gnome Power Manager from suspending while Oggenc is encoding
https://launchpad.net/bugs/49797
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs