[mythtv-users] help wanted

Michael T. Dean mtdean at thirdcontact.com
Tue Oct 9 06:17:43 UTC 2007


On 10/08/2007 09:51 PM, Xi Jiarong wrote:
>
>> On 10/08/2007 04:01 AM, Xi Jiarong wrote:
>>>
>>> I have a problem about MythTV and remote control: My Mythtv and
>>> remote control work properlly together now. However when I open
>>> other application or windows when Mythtv is running,and then
>>> didn't let the mythtv ui as be the frontend focused UI, but I
>>> found Mythtv UI would still be controlled by remote control even
>>> it is not on the front as been focused.
>>
>> Yep.  LIRC has no concept of Window focus because LIRC is often
>> used for things that have no windows to focus (i.e. my Internet
>> radio script). Instead LIRC /always/ sends command strings as
>> specified in the LIRC configuration file (typically ~/.lircrc) to
>> /all/ clients.  It is completely up to the client to determine
>> whether or not the action should be performed at the time.
>>
>> When MythTV starts another application, it stops listening to LIRC
>> commands until the other application exits.  If you start an
>> application on your own, Myth has no way of knowing it should
>> ignore the LIRC commands.
>>
>>> How to solve this problem so that let Remote control not to
>>> control Mythtv UI when I use remote cotrol for other application
>>> which is the current frontend focused window?
>>
>> Start the other application through MythTV (look at the EXECTV
>> examples in /usr/{,local/}share/mythtv/tvmenu.xml and note that
>> there is an EXEC equivalent for when you start an application that
>> doesn't need a capture card).
>>
>> The only other option is to use LIRC modes (
>> http://lirc.org/html/configure.html#lircrc_format ), but this
>> approach requires a lot of setup (possibly with redundant
>> configuration information--depending on how you want your modes to
>> work), requires synchronizing the "current" mode for all
>> applications ( http://lirc.org/html/lircrcd.html ), as well as UI
>> issues (having to devote buttons specifically to entering and
>> exiting modes and/or having to remember which mode you're in).  In
>> other words, you probably don't want to do it (I know I don't, and
>> I actually did it once just to verify).
>
> Thanks! But, are there any other ways can solve this problem then? it
> seems not so easy to solve this problem! another application would
> separated from MythTV now.
>

OK.  Here are two other ways:

1) shut down mythfrontend before starting the new app and start
mythfrontend after closing the new app

2) stop using Myth's native LIRC support and instead use irxevent to
send X events /only/ to the focused app.

I know it's not what you want to hear, but there are really no good
options.  Short of writing code to create a keybinding to tell Myth to
stop listening to LIRC events (save one that re-enables LIRC).

LIRC's mode support is probably the closest thing to what you want, but
you have to work to get it (it's a challenge to set up) and it has its
own limitations.

Mike


More information about the mythtv-users mailing list