<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><br><br><div>> Date: Sun, 12 Apr 2015 16:33:35 +0100<br>> From: mythtv-users@lists.boehmi.net<br>> To: mythtv-users@mythtv.org<br>> Subject: Re: [mythtv-users] combined BE/FE/MythWelcome shutdown<br>> <br>> On 12/04/15 02:01, Scott Bickford wrote:<br>> > Somehow, when I am finished watching/fussing with MythTV when I go to<br>> > exit the frontend, after saying yes I am sure I want to exit back to<br>> > MythWelcome, the frontend starts back up again (seems to be a sticky key<br>> > problem). Most of the time I have turned off the tv and don't see that<br>> > the FE has actually restarted again. <br>> > <br>> > Secondly, my wife sometimes forgets (or never even uses it) to exit the<br>> > FE, so it stays on potentially forever in this situation.<br>> > <br>> > I was thinking of a shell script to look at the FE activity in the it's<br>> > log, but it appears that there's some non human activity in it like:<br>> > <br>> > 2015-04-11 20:47:15.926944 I Bonjour: Service registration complete:<br>> > name 'Mythfrontend on localhost.localdomain' type '_mythfrontend._tcp.'<br>> > domain: 'local.'<br>> > <br>> > Any other ideas?<br>> <br>> Why do you think you need to exit the frontend? If it's so that the BE<br>> can shutdown, there is a standby mode in the FE settings which achieves<br>> the same.<br>> <br>> Setup - General - Shutdown/Reboot Settings - Idle time before entering<br>> the standby mode (minutes):<br>> <br>> As for the restarted FE. I guess you're using Mythbuntu, where the<br>> frontend starts from a wrapper script, which automatically restarts the<br>> FE when exited/killed.<br>> <br>> HTH<br>> Thomas<br>> _______________________________________________<br>> mythtv-users mailing list<br>> mythtv-users@mythtv.org<br>> http://lists.mythtv.org/mailman/listinfo/mythtv-users<br>> http://wiki.mythtv.org/Mailing_List_etiquette<br>> MythTV Forums: https://forum.mythtv.org<br></div><div><br></div><div>-----------------------------------------------------------------------------------</div><div><p class="MsoPlainText">Three things I can suggest:</p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">1. If your problem
is that your remote ‘double presses’ then what do you have in ~/.lirc/mythtv
for the ok button? Check that ‘repeat’ is
zero. Mine has:</p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">begin</p>
<p class="MsoPlainText"> remote =
mceusb</p>
<p class="MsoPlainText"> prog = mythtv</p>
<p class="MsoPlainText"> button = OK</p>
<p class="MsoPlainText"> config = Return</p>
<p class="MsoPlainText"> repeat = 0</p>
<p class="MsoPlainText"> delay = 0</p>
<p class="MsoPlainText">end</p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">See: http://www.lirc.org/html/configure.html for the meanings of the parameters.</p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">2. You could change
the FE back to the way it was set up ages ago with escape doing the exiting
from main menu. <span style="font-size: 12pt;">Use mythweb to change it:</span><span style="font-size: 12pt;">
</span><span style="font-size: 12pt;"> </span><span style="font-size: 12pt;">spanner> mythtv>
keybindings > main menu 'exit' to Esc</span><span style="font-size: 12pt;">
</span><span style="font-size: 12pt;">and 'exit prompt' to blank.</span><span style="font-size: 12pt;">
</span><span style="font-size: 12pt;">Scroll down for save.</span></p>
<p class="MsoPlainText">You can also do this from FE setup. Having done that, you could also:</p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">3. Program the
‘power’ button on the IR to shut it down.
</p>
<p class="MsoPlainText">In ~/.lirc/mythtv include this:</p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">begin</p>
<p class="MsoPlainText"> remote = mceusb</p>
<p class="MsoPlainText"> prog = irexec</p>
<p class="MsoPlainText"> button =
KEY_POWER</p>
<p class="MsoPlainText"> config =
/usr/bin/remotepower.sh</p>
<p class="MsoPlainText"> repeat = 0</p>
<p class="MsoPlainText"> delay = 0</p>
<p class="MsoPlainText">end</p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Put this script in /usr/bin/remotepower.sh</p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> </span></p>
<p class="MsoPlainText">#!/bin/sh</p>
<p class="MsoPlainText"># /usr/bin/remotepower.sh</p>
<p class="MsoPlainText"># Initiates a shutdown when the remote power button is
pressed.</p>
<p class="MsoPlainText">#Send escapes to Mythtv frontend until it closes back to
welcome</p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">REPLY=0</p>
<p class="MsoPlainText">while [ $REPLY -eq 0 ]; do</p>
<p class="MsoPlainText"> wmctrl -a
'MythTV Frontend'</p>
<p class="MsoPlainText"> REPLY=$?</p>
<p class="MsoPlainText"> if [ $REPLY
-eq 0 ]; then</p>
<p class="MsoPlainText"> xdotool
key "Escape"</p>
<p class="MsoPlainText"> sleep 1</p>
<p class="MsoPlainText"> fi</p>
<p class="MsoPlainText">done</p>
<p class="MsoPlainText">mythshutdown --unlock</p>
<p class="MsoPlainText">exit</p><p class="MsoPlainText"><br></p><p class="MsoPlainText"><span style="font-size: 12pt;">You’ll need to install xdtool – on Ubuntu it’s</span><span style="font-size: 12pt;"> </span></p>
<p class="MsoPlainText">sudo apt-get install xdtool</p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> </span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">hth<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Phil<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p></div><div><br></div> </div></body>
</html>