[mythtv-users] Add Sleep menu command to Mythbuntu

Michael Rice mikerice1969 at gmail.com
Tue Jun 17 20:17:58 UTC 2008


On 6/17/08, Brad DerManouelian <myth at dermanouelian.com> wrote:
> I just added a sleep menu command to my Mythbuntu setup:
>
>    <button>
>      <type>SHUTDOWN</type>
>      <text>Sleep</text>
>      <action>EXEC gnome-screensaver-command -a</action>
>    </button>
>
> However, when I select the command, it goes to sleep and wakes right
> back up again. I don't see anything in the mythfrontend logs. Any idea
> what I'm doing wrong? I normally use kde and xscreensaver so I'm not
> all that familiar with gnome-screensaver.

It looks like myth resets the screensaver after executing a menu item.
 I added this:

Index: mythcontext.cpp
===================================================================
--- mythcontext.cpp     (revision 16479)
+++ mythcontext.cpp     (working copy)
@@ -3727,6 +3727,7 @@

 void MythContext::ResetScreensaver(void)
 {
+    VERBOSE(VB_IMPORTANT, "Reset screen saver");
     QApplication::postEvent(GetMainWindow(),
             new ScreenSaverEvent(ScreenSaverEvent::ssetReset));
 }

Which seems to fire as I move through menu items.  That's my guess.


More information about the mythtv-users mailing list