The problem:

When starting an external program from Mythfrontend it doesn't put the program on top. This is extremely frustrating if your using LIRC to interact with the system because you need to dig up a keyboard.

The symptoms:

You launch an external program from Mythfrontend, such as Netflix and it appears that your system has locked up. sometimes you see Mythfrontend and can't interact with it, sometimes you will see the new program but can't interact with it

What is happening:

For some reason the window manager is not putting the new program on top, there is some documentation of it online but not much.

The test:

On your keyboard hit Alt-Tab it should cycle the spawned window to the top. You may have to hit it a few times to get the new program window to the top. If this works for you read the fix.

The fix:

Needed programs:

install xte

sudo apt-get xautomation

Edit lirc config file:

Add the following command to an unused key in ~/.lirc/mythtv on my system there was no entry for the "CLEAR" key on my remote

begin
    remote = mceusb
    prog = irexec
    button = KEY_CLEAR
    config = xte 'keydown Alt_L' 'key Tab' && xte 'keyup Alt_L'
    repeat = 0
    delay = 0
end

you may need to change the "remote =" and the "button =" to match what you want on your remote

Add irexec to your startup:

  1. Open your System Settings
  2. Open Session and Startup
  3. Select the Application Autostart tab
  4. select Add
    1. Name: irexec
    2. Descreption: doesn't matter
    3. Command: irexec -d ~/.lircrc
    4. Click Ok or Save.
  5. Close your way back out

Now the clear button on the remote is the same as hitting Alt-Tab

A little bit of lirc help:

to find out your remote and button name:

open up a Terminal and run irw  Point the remote at your ir receiver and push a button you never use. It will give you a response that looks something like this:

000000037ff07bf5 00 KEY_CLEAR mceusb

the last part of the entry is your remote, in this case mceusb  The second to last part is your button, in this case KEY_CLEAR

make sure there isn't an entry for your remote with that button and your good to go.