[mythtv-users] Changing Power button to restart mythfrontend

Tom Lichti tom at redpepperracing.com
Sat Nov 18 02:13:28 UTC 2006


James Pifer wrote:
> I'm trying to change the Power button to restart my mythfrontend. Once
> in a while the frontend seems to hang so I need an easy way for my wife
> to restart it. 
>
> I have a simple script that does a killall mythfrontend and then try to
> restart it. The following configuration in my .lircrc file definitely
> works:
>
> # Power Off/Exit
> begin
> prog = mythtv
> button = Power
> config = Esc
> end
>
> If I try to change it to this, nothing happens. 
> # Power Off/Exit
> begin
> prog = mythtv
> button = Power
> config = /home/mythtv/restartfrontend
> end
>
> What should the prog be set to? I've done some searching and I've looked
> at the wiki. I've tried setting prog to irexec and irxevent, but nothing
> happens (even if they are running). My /etc/lircd.conf make no reference
> to these irexec or irxevent, so is that a problem?
>
> What else do I need to do to be able to run the command? Sorry, just
> tired of searching. I really thought this one would be a quick and easy
> one. 
>   
This can be kind of hard to setup. You need to use prog = irexec in 
lircrc, the script you want to run must be executable by the user 
running it (in this case mythtv), and you need to have irexec be 
launched as part of the user desktop startup process. You can't launch 
irexec before starting X. I have a script /usr/local/bin/launch_irx.sh:

  killall -wq irexec
  irexec &

that runs when fluxbox (my WM) starts for mythtv. If all those are set, 
it should work. I would verify that your restartfrontend script also 
does what you want.

Tom



More information about the mythtv-users mailing list