I am trying to get my Harmony remote to start/stop the mythfrontend to make it simpler for my family to do different things. I am on Mythbuntu 12.04 32bit. I have setup a irexec file, and made sure its running in daemon mode. It all seems to kinda work, but not really sure what I&#39;m missing to make it run 100%. Here are my files, I think I just need another pair of eyes to help me see what I am missing.<div>

<br></div><div>The parts I can&#39;t easily show are I have my Harmony remote set to run two different activities. First one is &quot;Watch TV&quot; , second is &quot;Watch Movies&quot;. The watch TV activity is set to use the TV for audio (HDMI); then the movies activity is set to use SPDIF to my receiver. I have it set to send KEY_BLUE and KEY_YELLOW as the power on/off sequence from the remote. I have verified it is sending them with irw.</div>

<div><br></div><div>The reason behind all this is my wife seems to get easily confused, so I am trying to eliminate all &quot;hassles&quot; with switching applications. I should mention when I run these scripts by hand they run flawlessly. So I&#39;m not really sure where or why its not running correctly. The results are baffling. If I press &quot;Watch TV&quot; MythTV will pop up then close, then XBMC will open. If I press &quot;Watch Movies&quot; it does the opposite. At first I thought I had the Blue and Yellow wrong in the remote, but I&#39;ve verified it many times. I have also switched KEY_BLUE and KEY_YELLOW in the irexec file, but it didn&#39;t seem to make a difference. Any incite would be much appreciated.</div>

<div><br></div><div>~/.lirc/irexec</div><div><div><div># MythTV</div><div>begin</div><div>     remote = mceusb</div><div>     prog = irexec</div><div>     button = KEY_BLUE</div><div>     config = ~/scripts/mythtv_start.sh &amp;</div>

<div>end</div></div><div><br></div><div># XBMC</div><div>begin</div><div>     remote = mceusb</div><div>     prog = irexec</div><div>     button = KEY_YELLOW</div><div>     config = ~/scripts/xbmc_start.sh &amp;</div><div>

end</div><div><br></div></div><div><div><div>~/scripts/mythtv_start.sh </div><div>#!/bin/bash</div><div># Test to see if XMBC is running first</div><div>if ps -ef | grep xbmc.bin | grep -v grep</div><div>then</div><div><span style="white-space:pre-wrap">        </span>killall -v -s9 xbmc.bin</div>

<div>fi</div><div><div># Now to see if MythTV is running</div></div><div>if ps -ef | grep mythfrontend | grep -v grep</div><div>then</div><div># Do nothing</div><div>echo “MythTV already Running!”</div><div>else</div><div>

# Startup MythTV</div><div>mythfrontend</div><div>fi</div><div>exit</div></div><div><br></div><div>~/scripts/xbmc_start.sh </div><div>#!/bin/bash</div><div># Test to see if MythTV is running</div><div>if ps -ef | grep mythfrontend | grep -v grep</div>

<div>then</div><div>        killall -v -s9 <a href="http://mythfrontend.re" target="_blank">mythfrontend.re</a></div><div>fi</div><div># Now to see if XBMC is running</div><div>if ps -ef | grep -v grep | grep -i xbmc.bin</div>
<div>then</div>
<div># Do nothing</div><div>echo “XBMC already Running!”</div><div>else</div><div># Startup XBMC</div><div>xbmc</div><div>fi</div><div>exit</div></div><div><br></div>