Lirc for Creative LiveDrive

Foreword

I'm using my computer as main media center in my home. Most of music I listen and video I watch is played directly by my Linux media applications. Thanks to lirc package I can control my computer using remote control. It's a great thing especially for such a lazy person like me, I can do whatever I need with my computer not moving away from my couch. Lirc is offering support for wide range of infrared remote controls. I have Creative LiveDrive with RM-1500 remote control. Both devices were part of my Creative SoundBlaster Audigy 4 Pro sound card. KDE desktop environment has direct support for Lirc devices and thanks to this I'm able to remotely control any application that is using Linux system messaging bus DBus. What I especially love about remote control in Linux is that I'm not bound to some kind of default configuration I have to learn. I can setup my controls and choose applications I want to control by my self. Only my imagination and sky is the limit. Thats the main difference between Linux and other operating systems. You make Linux work as you like, not learn by heart how you should use your system.

I will try to share here my Lirc and remote control configuration that is coming from my main computer. Lirc is not the only remote control application available for Linux at the end you can find also short information about another applications I use to remote control my computer. Most of the provided here information should be applicable to any Linux distribution but some of the instruction are typical for distribution I use Gentoo Linux. If you have different remote control hardware you can still find some of the information provided here useful. I will start with kernel and system service configuration.

Kernel and system service configuration

My remote control is integrated with my sound card therefor I have to control it using sound card kernel module. To configure my kernel I had to enter kernel catalog and start menuconfig by running following commands in terminal:

cd /usr/src/linux
make menuconfig

Below you will find the list of needed kernel modules for my lirc device.

Linux Kernel Configuration: Kernel modules configuration
Loadable module support --->
   [*] Module unloading
Device Drivers --->
       Input device support --->
          [*] Event interface
   <M> Sound card support --->
          <M> Advanced Linux Sound Architecture --->
             [*] PCI sound devices --->
                 <M> Emu10k1 (SB Live!, Audigy, E-mu APS)  

As you can see the sound card support will be build as module. The module will be loaded by udev hardware allocation service and initialized during alsa sound system service start. After marking all necessary kernel modules I'm ready to recompile, install and use new kernel. I usually do it by running this commands in terminal:

cd /usr/src/linux
make && make modules_install install

This is not over yet. To initialize remote control for Emu10k1 kernel module I had to pass additional parameter to kernel module. I did this by providing sound module configuration in /etc/modprobe.d/alsa.conf. Below you can find part of my alsa.conf file that is affecting Audigy 4 sound card configuration.

alias snd-card-0 snd-emu10k1
options snd-emu10k1 index=0 id=audigy4pro extin=0x3fcf extout=0x1fcf enable_ir=1
alias sound-slot-0 snd-emu10k1

The most important part is options line. Kernel module option enable_ir = 1 is enabling infrared red remote control for my sound card.

Now it's good time to reboot the machine with new kernel. After this the new kernel modules should be loaded and infrared remote control should be available. Unfortunately I found out this is not enough to make my Sound Blaster Audigy 4 Pro LiveDrive properly receive infrared signals coming from it's remote control. LiveDrive control LED wasn't lighting when I was pressing remote control buttons. After searching the Internet I found out that LiveDrive device need to be initialized with special command. The best way to do it is to write additional simple system service which will depend on alsa sound system service. I called this service audigy. Below you can see the service script which is making my remote control fully operational.

View the full /etc/init.d/audigy system service file
  1. #!/sbin/runscript
  2.  
  3. depend() {
  4. need alsasound
  5. }
  6.  
  7. start() {
  8. ebegin "Initialising external I/O Hub"
  9. echo -e '\0360\0000\0040\0041\0141\0000\0000\0000\0177\0000\0367' > /dev/snd/midiC0D1
  10. eend $?
  11. }
  12.  
  13.  
  14. stop() {
  15. ebegin "Nothing to Stop"
  16. eend $?
  17.  

As you can see in this script my LiveDrive device is bound to device node /dev/snd/midiC0D1. The script itself is very basics it simply passes the initialization string using ASCI characters string in octal code. Now I can add this script to default run level to make it start on next system boot. To do it I need to run following command in terminal:

rc-update add audigy default

To make it start without the need of restarting my system I have to run following command in my terminal:

/etc/init.d/audigy start

After starting this service the LED on LiveDrive device started to light every time I pressed button on my remote control. Now we can move on to Lirc configuration.

Lirc Configuration

Before installing Lirc on Gentoo system you should provide a name of lirc devices in /etc/make.conf. This will make lirc install only components you need. In my system lirc configuration in /etc/make.conf looks like this:

LIRC_DEVICES="livedrive_midi"

To install lirc in Gentoo system you need to run this commands in terminal:

emerge -av sys-apps/lirc

Lirc installation, will provide system service which will let us start lirc daemon. Before starting this service we should configure it properly. First thing we need to do is to tell lirc service what type of device we want to use. We do it by appending LIRCD_OPTS options into /etc/conf.d/lircd file. Configuration for Audigy 4 Pro LiveDrive should look like this:

LIRCD_OPTS="-H livedrive_midi -d /dev/snd/midiC0D1"

Second thing we need to do is to provide a configuration file that will map core IR signals to our remote control buttons. On Lirc project page you will find a detailed instruction how to do it manually, but there is no need to. You should be able to easily find the configuration file for your remote control on Lirc page or somewhere in Internet. The configuration file should be saved as /etc/lirc/lircd.conf. Below you can see configuration for my devices.

View the full /etc/init.d/lircd.conf configuration file
  1. ##############################################################
  2. #RM-1500 For Audigy 4 Pro
  3. ##############################################################
  4.  
  5. begin remote
  6.  
  7. name Creative_RM-1500
  8. bits 16
  9. flags SPACE_ENC|CONST_LENGTH
  10. eps 30
  11. aeps 100
  12.  
  13. header 9078 4671
  14. one 663 1607
  15. zero 663 497
  16. ptrail 662
  17. repeat 9078 2216
  18. pre_data_bits 16
  19. pre_data 0x8322
  20. gap 106974
  21. min_repeat 4
  22. toggle_bit 0
  23.  
  24. begin codes
  25. Power 0x000000000000619E
  26. 1 0x0000000000008B74
  27. 2 0x0000000000008F70
  28. 3 0x000000000000906F
  29. 4 0x0000000000008A75
  30. 5 0x000000000000847B
  31. 6 0x0000000000007887
  32. 7 0x0000000000008976
  33. 8 0x000000000000837C
  34. 9 0x0000000000007788
  35. 0 0x000000000000807F
  36. CMSS 0x000000000000718E
  37. EAX 0x0000000000008C73
  38. Mute 0x0000000000006E91
  39. Vol_Down 0x000000000000639C
  40. Vol_Up 0x000000000000629D
  41. Up 0x0000000000007B84
  42. Left 0x0000000000008778
  43. Ok 0x000000000000817E
  44. Right 0x000000000000758A
  45. Down 0x0000000000008D72
  46. Return 0x0000000000008E71
  47. Start 0x0000000000008877
  48. Cancel 0x0000000000007C83
  49. Rec 0x000000000000738C
  50. Options 0x000000000000827D
  51. Display 0x0000000000007689
  52. Previous 0x0000000000007F80
  53. Play 0x0000000000007986
  54. Next 0x0000000000007A85
  55. Slow 0x0000000000007D82
  56. Stop 0x000000000000857A
  57. Step 0x0000000000007E81
  58. end codes
  59.  
  60. end remote
  61.  
  62. #
  63. # contributed by Stefan Br�ns
  64. #
  65. # brand: Creative Audigy 2 ZS Platinum LiveDrive
  66. # model no. of remote control:
  67. # devices being controlled by this remote:
  68. #
  69. begin remote
  70.  
  71.  
  72. name LiveDrive
  73. flags SPACE_ENC|CONST_LENGTH
  74. bits 16
  75. eps 30
  76. aeps 100
  77.  
  78.  
  79. header 9000 4500
  80. one 563 1687
  81. zero 563 562
  82. pre_data_bits 16
  83. pre_data 0x8000
  84. gap 108000
  85. toggle_bit 0
  86.  
  87.  
  88. repeat 9000 2250
  89.  
  90.  
  91. frequency 38000
  92. duty_cycle 33
  93.  
  94.  
  95.  
  96.  
  97. begin codes
  98. mute 0x0000000000000040
  99. vol+ 0x0000000000008080
  100. vol- 0x0000000000008082
  101. cmss 0x0000000000000080
  102. end codes
  103. end remote
  104.  
  105. begin remote
  106.  
  107. name LiveDrive_Headphone
  108. bits 16
  109. flags SPACE_ENC|CONST_LENGTH
  110. eps 30
  111. aeps 100
  112.  
  113. header 9000 4500
  114. one 563 1687
  115. zero 563 562
  116. repeat 9000 2250
  117. pre_data_bits 16
  118. pre_data 0x8000
  119. gap 108000
  120. toggle_bit 0
  121.  
  122. frequency 38000
  123. duty_cycle 33
  124.  
  125. begin codes
  126. Headphone_out 0x4000
  127. Headphone_in 0x4080
  128. end codes
  129.  
  130. end remote

As you can see my file has configuration for 3 devices. First one is my 33 button remote control. Second one is LiveDrive receiver which has 2 buttons and volume knob. The last one device is Hedphone monitor which will allow me to react on headphones plug in and out events. This ends my remote control configuration. Now I'm ready to use my lirc devices. I can start them by running following command in terminal:

/etc/init.d/lircd start

To make my lircd start as system service I have to run following command in terminal:

rc-update add lircd default

Now I can configure applications to use my lirc devices.

Applications configuration

There are two ways of controlling programs using lirc. First one is direct lirc support build into the application. To make my applications use lirc support I had to add lirc use flag to /etc/make.conf, then I can rebuild applications with the new use flag by running following command in terminal.

emerge --deep --update --newuse world

To check which of installed programs have direct lirc support you can use gentoolkit equery utility like this:

equery hasuse lirc
[ Searching for USE flag lirc in all categories among: ]
 * installed packages
[I--] [ ~] kde-base/kdeutils-meta-4.4.4 (4.4)
[I--] [  ] dev-python/kaa-base-0.6.0 (0)
[I--] [ ~] media-video/mplayer-1.0_rc4_p20100612 (0)
[I--] [  ] media-video/vlc-1.0.6 (0)
[I--] [ ~] media-plugins/audacious-plugins-2.3 (0)
[I--] [ ~] media-plugins/banshee-community-extensions-1.6.1 (0)
[I--] [ ~] media-tv/mythtv-0.23_p25073 (0)
 

As you can see on my system example there is wide range of programs that has direct lirc support. To make them use lirc you have to create a special ~/.lircrc configuration file in your home which will map program functions to remote control buttons. You can check what kind of program functions are available to user by running program help command or reading program documentation. Below you can find my .lircrc mapping file for MythTV media center, Audacious and Banshee sound players.

View the full ~/.lircrc configuration file
  1. #####################################################
  2. #MythTv LiveDrive Configuration
  3. #####################################################
  4. #Volume Down
  5. begin
  6. remote = LiveDrive
  7. button = vol-
  8. prog = mythtv
  9. config = [
  10. repeat = 1
  11. end
  12.  
  13. #Volume Up
  14. begin
  15. remote = LiveDrive
  16. button = vol+
  17. prog = mythtv
  18. config = ]
  19. repeat = 1
  20. end
  21.  
  22. #Mute
  23. begin
  24. remote = LiveDrive
  25. button = mute
  26. prog = mythtv
  27. config = |
  28. end
  29.  
  30. #Show teletex/caption
  31. begin
  32. remote = LiveDrive
  33. button = cmms
  34. prog = mythtv
  35. config = T
  36. end
  37.  
  38. #####################################################
  39. #Audacious LiveDrive Configuration
  40. #####################################################
  41.  
  42. #Volume Down
  43. begin
  44. remote = LiveDrive
  45. button = vol-
  46. prog = audacious
  47. config = VOL_DOWN
  48. repeat = 1
  49. end
  50.  
  51. #Volume Up
  52. begin
  53. remote = LiveDrive
  54. button = vol+
  55. prog = audacious
  56. config = VOL_UP
  57. repeat = 1
  58. end
  59. #Mute
  60. begin
  61. remote = LiveDrive
  62. button = mute
  63. prog = audacious
  64. config = MUTE
  65. end
  66.  
  67. # Playlist clear
  68. begin
  69. prog = audacious
  70. remote = LiveDrive
  71. button = cmss
  72. repeat = 0
  73. delay = 0
  74. config = PLAYLIST_CLEAR
  75. end
  76.  
  77. #####################################################
  78. #MythTV Creative RM-1500 Configuration
  79. #####################################################
  80.  
  81. begin
  82. remote = Creative_RM-1500
  83. button = Up
  84. prog = mythtv
  85. config = Up
  86. repeat = 1
  87. end
  88. begin
  89. remote = Creative_RM-1500
  90. button = Down
  91. prog = mythtv
  92. config = Down
  93. repeat = 1
  94. end
  95. begin
  96. remote = Creative_RM-1500
  97. button = Left
  98. prog = mythtv
  99. config = Left
  100. end
  101. begin
  102. remote = Creative_RM-1500
  103. button = Right
  104. prog = mythtv
  105. config = Right
  106. end
  107. #stop in mythmusic OR show osd
  108. begin
  109. remote = Creative_RM-1500
  110. button = Stop
  111. prog = mythtv
  112. config = O
  113. end
  114. begin
  115. remote = Creative_RM-1500
  116. button = Play
  117. prog = mythtv
  118. config = P
  119. end
  120. begin
  121. remote = Creative_RM-1500
  122. button = Previous
  123. prog = mythtv
  124. config = Home
  125. end
  126. begin
  127. remote = Creative_RM-1500
  128. button = Next
  129. prog = mythtv
  130. config = End
  131. end
  132. begin
  133. remote = Creative_RM-1500
  134. button = Vol_Down
  135. prog = mythtv
  136. config = [
  137. repeat = 1
  138. end
  139. begin
  140. remote = Creative_RM-1500
  141. button = Vol_Up
  142. prog = mythtv
  143. config = ]
  144. repeat = 1
  145. end
  146. begin
  147. remote = Creative_RM-1500
  148. button = Ok
  149. prog = mythtv
  150. config = Enter
  151. end
  152. begin
  153. remote = Creative_RM-1500
  154. button = Mute
  155. prog = mythtv
  156. config = |
  157. end
  158. #Numer Codes
  159. begin
  160. remote = Creative_RM-1500
  161. button = 1
  162. prog = mythtv
  163. config = 1
  164. end
  165. begin
  166. remote = Creative_RM-1500
  167. button = 2
  168. prog = mythtv
  169. config = 2
  170. end
  171. begin
  172. remote = Creative_RM-1500
  173. button = 3
  174. prog = mythtv
  175. config = 3
  176. end
  177. begin
  178. remote = Creative_RM-1500
  179. button = 4
  180. prog = mythtv
  181. config = 4
  182. end
  183. begin
  184. remote = Creative_RM-1500
  185. button = 5
  186. prog = mythtv
  187. config = 5
  188. end
  189. begin
  190. remote = Creative_RM-1500
  191. button = 6
  192. prog = mythtv
  193. config = 6
  194. end
  195. begin
  196. remote = Creative_RM-1500
  197. button = 7
  198. prog = mythtv
  199. config = 7
  200. end
  201. begin
  202. remote = Creative_RM-1500
  203. button = 8
  204. prog = mythtv
  205. config = 8
  206. end
  207. begin
  208. remote = Creative_RM-1500
  209. button = 9
  210. prog = mythtv
  211. config = 9
  212. end
  213. begin
  214. remote = Creative_RM-1500
  215. button = 0
  216. prog = mythtv
  217. config = 0
  218. end
  219.  
  220. #Show menu
  221. begin
  222. remote = Creative_RM-1500
  223. button = Options
  224. prog = mythtv
  225. config = M
  226. end
  227.  
  228. #Jump to bookmarked position
  229. begin
  230. remote = Creative_RM-1500
  231. button = Return
  232. prog = mythtv
  233. config = K
  234. end
  235. #Cycle through aspect ratios
  236. begin
  237. remote = Creative_RM-1500
  238. button = Display
  239. prog = mythtv
  240. config = W
  241. end
  242.  
  243. #close/cancel/escape
  244. begin
  245. remote = Creative_RM-1500
  246. button = Cancel
  247. prog = mythtv
  248. config = Esc
  249. repeat = 3
  250. end
  251.  
  252. #show teletext / captions
  253. begin
  254. remote = Creative_RM-1500
  255. button = CMSS
  256. prog = mythtv
  257. config = T
  258. end
  259. #Show information (OK button is Enter)
  260. begin
  261. remote = Creative_RM-1500
  262. button = Start
  263. prog = mythtv
  264. config = I
  265. end
  266. #adjust time stretch
  267. begin
  268. remote = Creative_RM-1500
  269. button = Slow
  270. prog = mythtv
  271. config = A
  272. end
  273.  
  274. #increase play speed
  275. begin
  276. remote = Creative_RM-1500
  277. button = Step
  278. prog = mythtv
  279. config = U
  280. end
  281.  
  282. #cycle through audio streams
  283. begin
  284. remote = Creative_RM-1500
  285. button = EAX
  286. prog = mythtv
  287. config = +
  288. end
  289.  
  290. begin
  291. remote = Creative_RM-1500
  292. button = Power
  293. prog = mythtv
  294. config = Esc
  295. end
  296. begin
  297. remote = Creative_RM-1500
  298. button = Rec
  299. prog = mythtv
  300. config = R
  301. end
  302.  
  303. #####################################################
  304. #Audacious Creative RM-1500 Configuration
  305. #####################################################
  306.  
  307. begin
  308. remote = Creative_RM-1500
  309. button = Play
  310. prog = audacious
  311. config = PLAYPAUSE
  312. end
  313.  
  314. begin
  315. remote = Creative_RM-1500
  316. button = Stop
  317. prog = audacious
  318. config = STOP
  319. end
  320.  
  321. begin
  322. remote = Creative_RM-1500
  323. button = Options
  324. prog = audacious
  325. config = SHUFFLE
  326. end
  327. begin
  328. remote = Creative_RM-1500
  329. button = Options
  330. prog = audacious
  331. config = SHUFFLE
  332. end
  333.  
  334. begin
  335. remote = Creative_RM-1500
  336. button = Return
  337. prog = audacious
  338. config = REPEAT
  339. end
  340.  
  341. begin
  342. remote = Creative_RM-1500
  343. button = Right
  344. prog = audacious
  345. config = FWD
  346. end
  347.  
  348. begin
  349. remote = Creative_RM-1500
  350. button = Left
  351. prog = audacious
  352. config = BWD
  353. end
  354.  
  355. begin
  356. remote = Creative_RM-1500
  357. button = Power
  358. prog = audacious
  359. config = QUIT
  360. end
  361.  
  362. begin
  363. remote = Creative_RM-1500
  364. button = Start
  365. prog = audacious
  366. config = LIST
  367. end
  368. begin
  369. remote = Creative_RM-1500
  370. button = EAX
  371. prog = audacious
  372. config = PLAYLIST_ADD
  373. end
  374.  
  375. begin
  376. remote = Creative_RM-1500
  377. button = CMSS
  378. prog = audacious
  379. config = PLAYLIST_CLEAR
  380. end
  381.  
  382. begin
  383. remote = Creative_RM-1500
  384. button = Previous
  385. prog = audacious
  386. config = PREV
  387. end
  388. begin
  389. remote = Creative_RM-1500
  390. button = Next
  391. prog = audacious
  392. config = NEXT
  393. endbegin
  394. remote = Creative_RM-1500
  395. button = Vol_Down
  396. prog = audacious
  397. config = VOL_DOWN
  398. repeat = 1
  399. end
  400. begin
  401. remote = Creative_RM-1500
  402. button = Vol_Up
  403. prog = audacious
  404. config = VOL_UP
  405. repeat = 1
  406. end
  407.  
  408. begin
  409. remote = Creative_RM-1500
  410. button = Mute
  411. prog = audacious
  412. config = MUTE
  413. end
  414.  
  415. #####################################################
  416. #Banshee LiveDrive Configuration
  417. #####################################################
  418.  
  419. #Volume Down
  420. begin
  421. remote = LiveDrive
  422. button = vol-
  423. prog = banshee
  424. config = volume-down
  425. repeat = 1
  426. end
  427.  
  428. #Volume Up
  429. begin
  430. remote = LiveDrive
  431. button = vol+
  432. prog = banshee
  433. config = volume-up
  434. repeat = 1
  435. end
  436.  
  437. #Mute
  438. begin
  439. remote = LiveDrive
  440. button = mute
  441. prog = banshee
  442. config = toggle-mute
  443. end
  444. # Play
  445. begin
  446. prog = banshee
  447. remote = LiveDrive
  448. button = cmss
  449. repeat = 0
  450. delay = 0
  451. config = play
  452. end
  453.  
  454. #####################################################
  455. #Banshee Creative RM-1500 Configuration
  456. #####################################################
  457.  
  458. begin
  459. remote = Creative_RM-1500
  460. button = Stop
  461. prog = banshee
  462. config = stop
  463. end
  464. begin
  465. remote = Creative_RM-1500
  466. button = Play
  467. prog = banshee
  468. config = play
  469. end
  470. begin
  471. remote = Creative_RM-1500
  472. button = Previous
  473. prog = banshee
  474. config = previous
  475. end
  476. begin
  477. remote = Creative_RM-1500
  478. button = Next
  479. prog = banshee
  480. config = next
  481. end
  482. begin
  483. remote = Creative_RM-1500
  484. button = Vol_Down
  485. prog = banshee
  486. config = volume-down
  487. repeat = 1
  488. end
  489. begin
  490. remote = Creative_RM-1500
  491. button = Vol_Up
  492. prog = banshee
  493. config = volume-up
  494. repeat = 1
  495. end
  496. begin
  497. remote = Creative_RM-1500
  498. button = Mute
  499. prog = banshee
  500. config = toggle-mute
  501. end

As you can see this file isn't complicated. For every remotely controlled function you have to create one entry closed between begin and end words. For every entry you must provide your remote controller name, it's button name, program name and program function that should be assigned to previously given button. Optionally you may defined repeat parameter if the function should be repeated when you hold down the button. This last parameter is useful mostly for volume controls. Number of available functions are dependent on lirc support implantation. As you can see on above example MythTV and Audacious has wide range of lirc functions while Banshee support is very basic.

Some of the applications are offering their own lirc support. XBMC best looking media center available for Linux is example of such application. To make it work with lirc you have to provide Lirc mapping configuration file in xml format and save it in your home as ~/.xbmc/userdata/Lircmap.xml. Below you can see my Lircmap.xml file.

View the full Lircmap.xml configuration file
  1. <lircmap>
  2. <remote device="LiveDrive">
  3. <volumeplus>vol+</volumeplus>
  4. <volumeminus>vol-</volumeminus>
  5. <mute>mute</mute>
  6. <power>cmss</power>
  7. </remote>
  8. <remote device="Creative_RM-1500">
  9. <power>Power</power>
  10. <one>1</one>
  11. <two>2</two>
  12. <three>3</three>
  13. <four>4</four>
  14. <five>5</five>
  15. <six>6</six>
  16. <seven>7</seven>
  17. <eight>8</eight>
  18. <nine>9</nine>
  19. <zero>0</zero>
  20. <info>CMSS</info>
  21. <menu>EAX</menu>
  22. <mute>Mute</mute>
  23. <volumeminus>Vol_Down</volumeminus>
  24. <volumeplus>Vol_Up</volumeplus>
  25. <up>Up</up>
  26. <left>Left</left>
  27. <select>Ok</select>
  28. <right>Right</right>
  29. <down>Down</down>
  30. <back>Return</back>
  31. <start>Start</start>
  32. <clear>Cancel</clear>
  33. <record>Rec</record>
  34. <title>Options</title>
  35. <display>Display</display>
  36. <skipminus>Previous</skipminus>
  37. <play>Play</play>
  38. <pageplus>Step</pageplus>
  39. <pause>Slow</pause>
  40. <stop>Stop</stop>
  41. <skipplus>Next</skipplus>
  42. </remote>
  43. </lircmap>

This file provides a mapping of the keys on my remote controllers to XBMC button strings defined as xml tags. Full list of button string available in XBMC you can find here. Those button strings are mapped by default XBMC configuration to actions available in media center. I could create my own action mappings but I found this unnecessary as default configuration is working quite well for me.

The second method to setup lirc support in applications is using build into KDE desktop environment GUI LIRC settings utility. The is probably the easiest way. This KDE tool has direct support and easy wizards to set up most popular KDE applications including: Kaffeine media player, Konqueror web browser, KDE sound mixer, VLC media player, Amarok media player, KsCD audio CD player, Okular document browser and Dragon media player. If this is not enough you can use advanced setup for any programs that are using Linux system messaging bus DBus. This way I was able to remotely control additional applications like for example Kmplayer media player. Using this tool you can also assign remote controller functions for shutdown, reboot, hibernate and suspend system actions. Last but not least you can setup lunch program actions. This tool is so easy to use that I want be wasting my time to explain how to work with it. You can see this tool on some of the screenshots provided below.

The configuration of Lirc is not so hard it just require some time to write all those files. Most of them you can find in Internet. Lirc package is not the only way to remotely control your Linux application. I use other tools as well below you find more information.

Additional Information

Besides the infrared remote controller I also have a bluetooth Cordless Logitech Rumplepad 2 game pad. I use this pad to control my media center applications MythTV and XBMC. I also use it as remote pointing device. To control both media centers I had to build them with joystick support. For MythTV I additionally had to create a joystick configuration file in my home and save it as ~/.mythtv/joystickmenurc. Below you can see my joystick configuration file for mythtv.

View the full joystickmenurc configuration file
  1. devicename /dev/input/js0
  2.  
  3. button 0 Enter
  4. button 1 T
  5. button 2 P
  6. button 3 0
  7. button 4 M
  8. button 5 K
  9. button 6 I
  10. button 7 A
  11. button 8 U
  12. button 9 Esc
  13. button 10 |
  14. button 11 Escape
  15. axis 1 -32767 0 Home
  16. axis 1 32767 0 End
  17. axis 2 32767 0 [
  18. axis 2 -32767 0 ]
  19.  
  20. axis 4 -32767 0 Right
  21. axis 4 0 32767 Left
  22. axis 5 -32767 0 Down
  23. axis 5 0 32767 Up

In this file I provide a joystick device node and mapping of my joystick buttons and axis to MythTV functions.

Controlling XBMC with my game pad does not require any additional configuration as XBMC comes with full support for Logitech Cordless RumplePad 2 game controller. My game pad was working in XBMC right away after media center installation.

To use my game pad as remote pointing device I had to additionally install QJoyPad application. This is program which lets user translate input events generated by joysticks into mouse actions and keystrokes in Linux X environment. This program comes with simple to use settings wizard which is helping user create many layout configurations. User can switch between defined configurations in runtime.

Prove that it's working

Sources


Comments

If you have found something wrong with the information provided above or maybe you just want to speak your mind about it, feel free to leave a comment.
All comments will show up on page after being approved. Sorry for such policy but I want to make sure that my site will be free of abusive or vulgar content. I don't mind being criticized just do it using right words.

Leave a comment