|Some of the system software I use|
|Xfce||Lightweight desktop environment that looks nice and runs on older computers.|
|LIRC||Software to control your PC with an infrared remote control (read more in the next section: How does LIRC work?).|
|xte||Program to fake keyboard strokes and mouse movements. I use it in combination with LIRC tool irexec (see LIRC configuration). Part of the Debian package xautomation.|
|LIRC plug-in for Banshee.|
|DesktopNova||Program that turns your desktop background into a slide show (for Gnome and Xfce based systems).|
|Unclutter||Utility that hides the mouse pointer after a period of inactivity.|
|Compton||Compositor featuring tear-free video (see Tear-free video).|
The applications I use most
|Me TV||Easy to use application to watch and record television. If you want a more sophisticated TV application, try MythTV. No support for LIRC but you can control Me TV with xte and LIRC tool irexec (see LIRC configuration).|
|VLC||Media player that plays almost every video format, including recordings made with Me TV. Plays DVD's as well (with DVD menu's that can be controlled with your mouse, keyboard or remote). LIRC is supported by VLC.|
|Banshee||Application that allows you to manage and play your music, rip CD's, listen to Internet radio and more. LIRC is supported via the Banshee LIRC plug-in.|
|Ristretto||Fast photo viewer. If you want an application that also manages your photo's, you could try Shotwell. No LIRC support but you can control Ristretto with xte and LIRC tool irexec (see LIRC configuration).|
Before actually setting up LIRC, first let's see how it works. In the picture on the right you can see the data flow between the hardware and software components of my LIRC setup.
When you push a button on your remote control, it sends out an infrared data signal. The infrared receiver receives this data signal and via the serial port and the lirc_serial device driver the data is sent to the lircd daemon.
The lircd daemon translates the "infrared data" into the name of the remote control button that was pushed. The translation (decoding) is defined in the configuration file lircd.conf. Each type of remote has its own lircd.conf file.
See my lircd.conf file to get an idea how a configuration file looks like.
Applications with LIRC support receive the name of the pushed button from the lircd daemon and a specific action is executed. For each button on your remote control you can configure an application and the action it has to execute. This is done in the .lircrc configuration file.
Take a look at my .lircrc file and see how applications and actions are assigned to remote control buttons.
As stated in the previous section, LIRC uses the configuration files lircd.conf and .lircrc.
The LIRC daemon lircd uses the lircd.conf configuration file to translate "infrared data" sent by your remote, into the names of the remote control buttons. On the LIRC website you can find configuration files for about 2500 different types of remote controls.
If your remote control is not in the list, you can create your own configuration file. You need the tool irrecord (part of LIRC) to do this. Typical usage:
$ irrecord -d /dev/lirc0 lird.conf
The tool irrecord will ask you to push buttons on your remote and will also ask you to enter the names of the buttons. This whole procedure will take some time! The output is written to the file lird.conf in the current directory. Read more about irrecord on the LIRC website.
Applications with LIRC support use the .lircrc configuration file to see what action has to be taken when a certain remote button is pushed. Below you find some examples. A more detailed explanation about the .lircrc file format can be found on the LIRC website.
Play the next song in Banshee music player with the forward button on your remote:
begin button = forward prog = banshee config = next end
A special application is the LIRC tool irexec. It is used to execute other applications.
Start VLC media player using the AV button:
begin button = av prog = irexec config = vlc end
I mainly use irexec in combination with xte to generate fake keyboard strokes. For example, if you want to close a window using your keyboard, you press Alt+F4. To close a window with a button on your remote, you can use irexec and xte to fake the Alt+F4 keyboard strokes.
Close a window with the power button, using xte:
begin button = power prog = irexec config = xte 'keydown Alt_L' 'key F4' 'keyup Alt_L' end
You can also use the LIRC tool irxevent to generate fake keyboard presses. But I find this tool more complicated than xte and it does not offer extra features that I need.
One of the problems I ran into was the fact that the standard LIRC startup script in Debian does not work for my setup. So I made my own startup script. I call the script from /etc/rc.local. You can easily test this script by running it from a terminal as root.
#!/bin/bash # Startup script for LIRC daemon with home-brew serial port IR receiver # Create directory /var/run/lirc/ (needed by lircd) mkdir /var/run/lirc/ # Free serial port setserial /dev/ttyS0 uart none # Load lirc_serial module (device driver) # This will create device /dev/lirc0 modprobe lirc_serial # Start LIRC Daemon /usr/sbin/lircd -d /dev/lirc0
Finally a summary how to install, configure and start LIRC.
$ chmod 644 /etc/init.d/lirc
$ compton --backend glx --paint-on-overlay \ --glx-no-stencil --vsync opengl-swc -bCall this command using the autostart feature of your desktop.