• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

A <very> brief guide to remapping your remote

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Stratus_ss

Overclockix Snake Charming Senior, Alt OS Content
Joined
Jan 24, 2006
Location
Ontario Canada
HowTo: A <very> brief guide to remapping your remote

so after digging and digging and pulling from various sources I finally have this sorted around so I thought I would pass it on

Objective: Push a button on your remote and have it launch a program or execute a command

You need: lirc, irexec and possibly lirc-modules-source

You need to know: where the program bins are located; how to edit a text file

Step 1: plug in your remote, wait several seconds then find out if and how linux is detecting it by using

Code:
lsusb
dmesg |tail

sample output: lsusb
Code:
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 1784:0008 TopSeed Technology Corp. 
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

sample output: dmesg
Code:
[    6.646188] lirc_mceusb2: Philips eHome USB IR Transceiver and Microsoft MCE 2005 Remote Control driver for LIRC $Revision: 1.44 $
[    6.646191] lirc_mceusb2: Daniel Melander <[email protected]>, Martin Blatter <[email protected]>
[    6.938644] lirc_mceusb2[2]: Topseed Technology Corp. eHome Infrared Transceiver on usb3:2
[    6.938671] usbcore: registered new interface driver lirc_mceusb2

As you can see I have an mceusb2. This is important for the next step

Step 2: install what you need
Code:
sudo apt-get install lirc irexec lirc-modules-source

Select your model of remote when prompted by lirc

Step 3: type
Code:
 irw

to test to see if your remote is working. If its working, as you push buttons it will spit out jibberish in response to the keypress (well its not jibberish but you get the drift)

Step 4: run
Code:
mythbuntu-lirc-generator

this will generate .lircrc and .lirc/ files/folders

Step 4: create a link inside the .lircrc file it should look something like this

Code:
 ~/.lirc/irexec

Step 5: create the file .lirc/irexec (choose your favorite editor... i like nano)

Code:
sudo nano ~/.lirc/irexec

Step 6: insert the code into the irexec, save and exit. The code looks like this

Code:
begin
    remote = mceusb
    prog = irexec
    button = RecTV
    config = /usr/bin/xbmc
    repeat = 0
    delay = 0
end

where remote is the remote which you have and the config file is what you want the computer to do on button press

Step 7: restart lirc and manually start irexec

Code:
sudo /etc/init.d/lirc restart
/usr/bin/irexec -d /home/$USER/.lirc/irexec

Test your buttons. If it works, great your pretty much done, you just need to add irexec to your startup

System->Preferences->Startup Applications if you are using a gnome desktop

or Applications->Settings->Sessions and Startup if you are using XFCE
(sorry I dont have KDE on any computers)

There you have it.

Any problems just post back
 
Last edited: