LinHES Forums
http://forums.linhes.org/

Map Power Button To Start Frontend
http://forums.linhes.org/viewtopic.php?f=21&t=21264
Page 1 of 1

Author:  davefor [ Mon Aug 02, 2010 11:46 am ]
Post subject:  Map Power Button To Start Frontend

Just wondering if anyone has mapped a remote button to start the frontend
Every once and a while I exit out of the frontend. And would like to be able to start it backup with using the remote

I have R6.03 with a pvr350 and silver remote
I know alt+m starts the frontend

Would this work
begin
prog = mythtv
button = Power
config = Alt,m

Not sure how to have it act as two key pressed together.

Author:  djb61230 [ Mon Aug 02, 2010 12:00 pm ]
Post subject: 

Not specifically a solution to send the Alt-m but my reading of the lirc configure page makes me believe this would work:

http://www.lirc.org/html/configure.html

Code:
    begin
        button = Power
        prog   = irexec
        repeat = 0
        config = mythfrontend&
    end



This should launch the frontend every time you hit the power button. Which of course might be dangerous. Perhaps write a script that is called instead of mythfrontend directly - in the script make sure mythfrontend is not running before starting another.

Author:  mihanson [ Mon Aug 02, 2010 2:22 pm ]
Post subject: 

This works like a champ:

Code:
[mihanson@zotac ~]$ cat /usr/local/bin/restartmyth.sh
#!/bin/bash

if [ "$(pidof mythfrontend)" ] ;
 then
  sudo killall mythfrontend
  sleep 0.5
  /usr/bin/mythfrontend -d -l /var/log/mythtv/mythfrontend.log &
 else
  /usr/bin/mythfrontend -d -l /var/log/mythtv/mythfrontend.log &
fi


If mythfrontend is running, kill it and then restart it. If mythfrontend is not running, start it.

lircrc:
Code:
# Restart a hung frontend
begin
   prog = irexec
   button = POWER
   config = /usr/local/bin/restartmyth.sh &
end

Author:  davefor [ Wed Aug 04, 2010 6:53 pm ]
Post subject: 

Thanks for the help

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/