Difference between revisions of "Hulu Desktop Integration"

From MythTV Official Wiki
Jump to: navigation, search
(edited instructions for adding -r switch to lirc)
(asthetic changes to prev submission)
Line 48: Line 48:
 
Whatever is in the place of ''Hauppauge_350'' on your system is your remote.  Edit ~/.huludesktop accordingly.
 
Whatever is in the place of ''Hauppauge_350'' on your system is your remote.  Edit ~/.huludesktop accordingly.
  
*** Hulu Desktop for Linux requires that lircd (>= 0.8.2) be run with the -r
 
(--release) switch.
 
  
If you are using Fedora, you can add the line
+
Hulu Desktop requires the -r (--release) option for proper operation.
LIRCD_OPTIONS="-r"
+
 
 +
If you are using '''Fedora''', you can add the line:
 +
LIRCD_OPTIONS="-r"
 
under the start() section of /etc/init.d/lirc
 
under the start() section of /etc/init.d/lirc
  
If you are using Ubuntu, you can add the line
+
If you are using '''Ubuntu''', you can add the line:
REMOTE_LIRCD_ARGS="-r"
+
REMOTE_LIRCD_ARGS="-r"
 
to /etc/lirc/hardware.conf
 
to /etc/lirc/hardware.conf
 +
  
 
Now, restart LIRC.  If all goes well, LIRC is now running with the --release switch.  You can verify this:
 
Now, restart LIRC.  If all goes well, LIRC is now running with the --release switch.  You can verify this:

Revision as of 06:04, 11 October 2009


General

This guide will walk you through the installation and integration of Hulu Desktop for Linux. Hulu only officially supports Ubuntu 8.04+ and Fedora 9+, but most other distros should work. This guide was written for Ubuntu 9.04 (Jaunty Jackalope). It assumes that you're running as the user that as your Mythfrontend, and that you have already configured LIRC to work. Full LIRC setup is outside the scope of this article.

Please note that the guide doesn't fully integrate Hulu into your Mythfrontend--it configures it to launch Hulu Desktop from Myth and sets up LIRC.

Installation

Installation of the Hulu Desktop app itself is fairly trivial, assuming you have the necessary prerequisites. You will need Flash installed. If you don't already have it, install it with:

sudo apt-get install flashplugin-nonfree

Now, download the .deb for your architecture and distro from Hulu Labs. To install using the command prompt:

sudo dpkg --install filename

MythFrontend

The next step allows you to launch Hulu from your Mythfrontend. We're going to edit the XML files for your theme for this. Copying XML files from /usr/share/mythtv into ~/.mythtv allows you to customize menus and prevents them from being overwritten during an upgrade.

Get a command line, and enter the following:

cp /usr/share/mythtv/mainmenu.xml ~/.mythtv

This assumes you haven't already edited your Mythfrontend's appearance. If you have, edit your existing copy of mainmenu.xml. In my case, I wanted Hulu available on the main menu. You can add it to wherever you like, you just need to copy the right XML file and edit it.

Now, open up mainmenu.xml (or whatever file you copied over) in your favorite editor. Add the following lines where you want your Hulu button to live.

<button>
       <text>Hulu Desktop</text>
       <action>EXEC /usr/bin/huludesktop</action>
</button>

The next time you run your Mythfrontend, the button will appear on your main menu.

LIRC

I'll admit there is probably a better way to do this than the way I've written it here. After a few hours of searching, I wasn't able to find it. This will do the job until I find the right way.

First, open ~/.huludesktop in your favorite editor and find the lirc_remote_identifier line. Replace mceusb with your remote. If you don't know it, exit the editor and run irw. Hit a few buttons on your remote, and you'll get output similar to the following:

squeaker@myth:~$ irw
0000000000001795 00 Down Hauppauge_350
0000000000001797 00 Right Hauppauge_350

Whatever is in the place of Hauppauge_350 on your system is your remote. Edit ~/.huludesktop accordingly.


Hulu Desktop requires the -r (--release) option for proper operation.

If you are using Fedora, you can add the line:

LIRCD_OPTIONS="-r"

under the start() section of /etc/init.d/lirc

If you are using Ubuntu, you can add the line:

REMOTE_LIRCD_ARGS="-r"

to /etc/lirc/hardware.conf


Now, restart LIRC. If all goes well, LIRC is now running with the --release switch. You can verify this:

root@myth:/etc/init.d# ps aux | grep lircd
root     26192  0.0  0.0   3116   584 ?        Ss   14:22   0:00 /usr/sbin/lircd --device=/dev/lirc0 --release
root     27575  0.0  0.0   3336   804 pts/0    S+   14:49   0:00 grep lircd

As usual, YMMV. The arrow keys worked immediately for me with LIRC and Hulu after this, since they happened to have the same names as my lircd.conf file. In order to make the menu appear, I had to change

button_name_menu = Home

to

button_name_menu = Menu

for everything to work correctly.