Setup MythTV and Lirc for YouTube Leanback
This page shows how to map the buttons of your remote control for navigation of YouTube Leanback and linking that into the MythTV menu.
Although there are some limitations for using the keyboard for control of YouTube Leanback, it is possible to use Google Chrome for all activities apart from searching without using a mouse.
You can obtain Google Chrome for Linux from here
Lircrc Configuration for YouTube Leanback
The Lirc utility "irxevent" maps the remote control buttons to keyboard strokes and sends those keys to the nominated window. The mapping is controlled by a lircrc file, to avoid any clash with existing irxevent mappings you can isolate the YouTube Leanback mapping into its own mapping file, shown below.
Thanks to http://mythtv.org/pipermail/mythtv-dev/2002-September/000316.html for discovering the correct irxevent configuration for the spacebar
nano /home/mythtv/.mythtv/youtube_leanback_lircrc
begin
prog = irxevent
button = Play
repeat = 0
config = Key space CurrentWindow
end
begin
prog = irxevent
button = Pause
repeat = 0
config = Key space CurrentWindow
end
begin
prog = irxevent
button = Left
repeat = 0
config = Key Left CurrentWindow
end
begin
prog = irxevent
button = Right
repeat = 0
config = Key Right CurrentWindow
end
begin
prog = irxevent
button = Stop
repeat = 0
config = Key ctrl-w CurrentWindow
end
begin
prog = irxevent
button = Up
repeat = 0
config = Key Up CurrentWindow
end
begin
prog = irxevent
button = Down
repeat = 0
config = Key Down CurrentWindow
end
begin
prog = irxevent
button = Ok
repeat = 0
config = Key Return CurrentWindow
end
begin
prog = irxevent
button = Home
repeat = 0
config = Key F11 CurrentWindow
end
Adding MythTV Menu Item for YouTube Leanback
Wrap up starting the irxevent and invoking Google Chrome into a script
nano /home/mythtv/.mythtv/youtube_leanback
irxevent /home/mythtv/.mythtv/youtube_leanback_lircrc & google-chrome http://youtube.com/leanback killall irxevent
Then call the script from a MythTV menu item:
nano mainmenu.xml
<?xml version="1.0" encoding="UTF-8" ?>
<mythmenu name="MAIN">
<button>
<type>TV_WATCH_TV</type>
<text>YouTube Leanback</text>
<action>EXEC /home/mythtv/.mythtv/youtube_leanback http://youtube.com/leanback</action>
<description>Launch Google to Youtube Leanback</description>
</button>
...
Follow on Facebook