[mythtv-users] Re: Starting mythtv using LIRC?

Pete Cable petercable at gmail.com
Sun Jun 5 06:23:23 UTC 2005


On 6/4/05, Nick <knowledgejunkie at gmail.com> wrote:
> On 6/4/05, Michael T. Dean <mtdean at thirdcontact.com> wrote:
> > Sim wrote:
> > 
> > >I use KDE and want to set the TV button my remote to start mythtv.  Any
> ideas
> > >how to do this - i've tried using irxevent to pass a ctrl-t (which is
> the
> > >hotkey i setup in kde for mythtv) but that did not work.
> > >
> > >

I use irexec to do this. Here's the relevant section from my .lircrc

# Power Off/Exit
begin
prog = irexec
button = POWER
repeat = 4
config = /home/pete/.fluxbox/startmyth.pl
end

and here is my script to start myth...

#!/usr/bin/perl

$pid=`pgrep mythfrontend`;

if ($pid) {
        print "mythfrontend running, $pid\n";
}
else {
        print "starting mythfrontend\n";
        system("mythfrontend &");
}

The script just keeps you from accidentally firing off a 2nd
mythfrontend when one is already running. All you need after that is
to make sure irexec is running. I have a script that runs on login to
fluxbox to fire off irexec, once again just making sure I don't end up
with two copies running:

#!/bin/bash
killall irexec
irexec &

Hope this helps...
-- 
Pete


More information about the mythtv-users mailing list