#10363 NORM 10.1.3: Auto-Suspend gets in the way when sharing over Salut
James Cameron
quozl at laptop.org
Thu Sep 16 19:23:00 EDT 2010
On Thu, Sep 16, 2010 at 05:38:29PM -0400, Martin Langhoff wrote:
> 2 - hack the Tubes/Telepathy stack to _prevent sleep_ while an actual
> collaboration session is running
This might help. Once an activity is shared, the laptop stays awake
until the activity is stopped.
(sugar-toolkit.git)
--- a/src/sugar/activity/activity.py
+++ b/src/sugar/activity/activity.py
@@ -916,6 +916,14 @@ class Activity(Window, gtk.Container):
self._share_id = self._pservice.connect("activity-shared",
self.__share_cb)
self._pservice.share_activity(self, private=private)
+ # inhibit suspend during sharing
+ path = '/var/run/powerd-inhibit-suspend/%s' % os.getpid()
+ try:
+ fd = open(path, 'w')
+ except IOError:
+ pass
+ else:
+ fd.close()
def _show_keep_failed_dialog(self):
alert = Alert()
--
James Cameron
http://quozl.linux.org.au/
More information about the Devel
mailing list