Friday, February 29, 2008

Setting up the Remote Control (LIRC)

Now I want to setup a remote control to navigate through Elisa instead of using the mouse. I chose the standard windows media remote control and receiver because it is one of the most supported remotes available.

For a list of supported remotes, visit: http://www.lirc.org/

Plug in the receiver for the remote control (usually USB).

The following information is available from this tutorial for installing LIRC on Ubuntu (Gutsy): https://help.ubuntu.com/community/InstallLirc/Gutsy)

Install lirc by opening a terminal and typing:

DEBIAN_FRONTEND=gnome sudo apt-get install lirc

After the install, you can test the remote by typing 'irw' in the terminal. This will appear to make the terminal "hang".

Press buttons on the remote control. You should see them come up on in the terminal. To end testing, hit 'ctrl-c'.

Now you need to map the buttons on your remote control to the application you're using.

Install the button mappings application which will generate mapping files (lircrc files) for MythTV, Xine, MPlayer, VLC, Totem, & Elisa by running:

sudo apt-get install mythbuntu-lirc-generator

I used the following command to generate just the elisa lircrc file in the current directory.

mythbuntu-lircrc-generator -l ./elisa.lirc --mythtv 0 --mythtv_lircrc 0 --mplayer 0 --totem 0 --xine 0 --vlc 0 --xmame 0 --xmess 0

I posted the file I used here if you want to use that instead of generating one.

If you want to generate all the lircrc files for the above applications, run this instead:

mythbuntu-lircrc-generator

Copy the generated elisa lircrc file (I renamed mine to elisa.lirc) to this directory:

/usr/lib/python2.5/site-packages/elisa/plugins/lirc_plugin/data/lirc

Edit the lirc_input section of the elisa.conf file (in ~/.elisa/) so it looks like this:

[lirc:lirc_input]
# filename of the LIRC config map to use
lirc_rc = 'elisa.lirc'

You also need to start the LIRC application by running:

sudo /etc/init.d/lirc start

Now to test it out... Start up Elisa and try navigating through the menus with your remote control.


Continued: Setting up a Remote Connection

3 comments:

Ciso said...

Hi, i get this error:
$ irw
connect: Connection refused

Thanks for the help

Krzysztof Śmigielski said...

Thanks :)

I ended your tutorial on running mythbuntu-lircrc-generator. After that everything started working just fine.

Checked on Mac Mini 2007 with Ubuntu 9.10.

KaruppuSwamy Thangaraj said...

Thanks for this wonderful post - I was trying to control totem through my MCE remote - after reading your post, it took just 1 min to get it done. Hats off to you!