[mythtv-users] combined BE/FE/MythWelcome shutdown

Philip Brady phil.brady at hotmail.co.uk
Sun Apr 12 17:15:56 UTC 2015



> Date: Sun, 12 Apr 2015 16:33:35 +0100
> From: mythtv-users at lists.boehmi.net
> To: mythtv-users at mythtv.org
> Subject: Re: [mythtv-users] combined BE/FE/MythWelcome shutdown
> 
> On 12/04/15 02:01, Scott Bickford wrote:
> > Somehow, when I am finished watching/fussing with MythTV when I go to
> > exit the frontend, after saying yes I am sure I want to exit back to
> > MythWelcome, the frontend starts back up again (seems to be a sticky key
> > problem).  Most of the time I have turned off the tv and don't see that
> > the FE has actually restarted again. 
> > 
> > Secondly, my wife sometimes forgets  (or never even uses it) to exit the
> > FE, so it stays on potentially forever in this situation.
> > 
> > I was thinking of a shell script to look at the FE activity in the it's
> > log, but it appears that there's some non human activity in it like:
> > 
> > 2015-04-11 20:47:15.926944 I  Bonjour: Service registration complete:
> > name 'Mythfrontend on localhost.localdomain' type '_mythfrontend._tcp.'
> > domain: 'local.'
> > 
> > Any other ideas?
> 
> Why do you think you need to exit the frontend? If it's so that the BE
> can shutdown, there is a standby mode in the FE settings which achieves
> the same.
> 
> Setup - General - Shutdown/Reboot Settings - Idle time before entering
> the standby mode (minutes):
> 
> As for the restarted FE. I guess you're using Mythbuntu, where the
> frontend starts from a wrapper script, which automatically restarts the
> FE when exited/killed.
> 
> HTH
> Thomas
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

-----------------------------------------------------------------------------------Three things I can suggest:

 

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:

 

begin

    remote =
mceusb

    prog = mythtv

    button = OK

    config = Return

    repeat = 0

    delay = 0

end

 

See:  http://www.lirc.org/html/configure.html for the meanings of the parameters.

 

 

2.  You could change
the FE back to the way it was set up ages ago with escape doing the exiting
from main menu.   Use mythweb to change it: 
 spanner> mythtv>
keybindings > main menu 'exit' to Esc 
and 'exit prompt' to blank. 
Scroll down for save.

You can also do this from FE setup.  Having done that, you could also:

 

3.  Program the
‘power’ button on the IR to shut it down. 


In ~/.lirc/mythtv include this:

 

begin

    remote = mceusb

    prog = irexec

    button =
KEY_POWER

    config =
/usr/bin/remotepower.sh

    repeat = 0

    delay = 0

end

 

 

Put this script in /usr/bin/remotepower.sh

 

#!/bin/sh

# /usr/bin/remotepower.sh

# Initiates a shutdown when the remote power button is
pressed.

#Send escapes to Mythtv frontend until it closes back to
welcome

 

REPLY=0

while [ $REPLY -eq 0 ]; do

      wmctrl -a
'MythTV Frontend'

      REPLY=$?

      if [ $REPLY
-eq 0 ]; then

            xdotool
key "Escape"

            sleep 1

      fi

done

mythshutdown --unlock

exit
You’ll need to install xdtool – on Ubuntu it’s 

sudo apt-get install xdtool

 

hth

Phil

 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20150412/0ae5fee7/attachment.html>


More information about the mythtv-users mailing list