[mythtv-users] Run a program from a key?

Robert Longbottom rongblor at googlemail.com
Mon Feb 6 20:17:19 UTC 2012

On 6 Feb 2012, at 07:32 PM, "Kris B." <krisbee at krisbee.com> wrote:

> Sorry if this is a simple question - I can't seem to find the answer.
> I would love to have a keybinding to a function key to run an external
> program (my suspend script), so that my harmony remote on tv off can
> push that key for me and suspend my machine - right now it suspends
> after 1.5 hrs of inactivity if I am not watching a program (via
> xscreensaver), and I have my pause timer to kick out after 60 minutes. 
> I also have the machine auto-suspend at 12:30AM if it hasn't already. 
> This has helped regulate how much power I am using - but it would be
> cool if the machine suspended when I turn the tv off, also :)
> Is there a setting somewhere, or a config file where I can modify that?
> Thanks in advance,
> -- 
>  Kris B.


I use irexec and a mapping in my lirc config file to achieve the same thing using an rc6 ir remote control. Presumably you could do something similar. 

You need to have irexec running in the background as a daemon and the in just executes the script. 

  prog = irexec
  button = KEY_POWER
  repeat = 0
  config = /home/mythtv/bin/suspend.sh


More information about the mythtv-users mailing list