by lunarg on October 1st 2007, at 22:06
6 pages

The following is optional. If you don't have an IR receiver and remote, and/or an LCD display, you'll probably be skipping this page.

Installing and configuring LIRc

First thing to do is to determine which hardware you have. Best thing to do is to Google for it, or look it up at the MythTV wiki.

Once you figure out which device you require, edit make.conf to add a new configuration flag, called LIRC_DEVICES.
For my hardware - the Media Center Edition remote USB (RC-6) - I have to add this to make.conf:

LIRC_DEVICES="mceusb2"

Installing LIRc

Next, merge LIRc like so:

emerge -av lirc

Notice the output (the red flags): those are the devices for which support will be built:

app-misc/lirc-0.8.2-r1  USE="X -debug -doc -hardware-carrier -transmitter" LIRC_DEVICES="mceusb2 -accent -act200l -act220l -adaptec -all -alsa_usb -animax -asusdh -atilibusb -atiusb -audio -audio_alsa -avermedia -avermedia98 -avermedia_vdomate -bestbuy -bestbuy2 -breakoutbox -bte -bw6130 -caraca -chronos -cmdir -cph06x -creative -creative_infracd -devinput -digimatrix -dsp -dvico -ea65 -exaudio -flyvideo -gvbctv5pci -hauppauge -hauppauge_dvb -hercules_smarttv_stereo -igorplugusb -imon -imon_pad -imon_pad2keys -imon_rsc -inputlirc -irdeo -irdeo_remote -irman -irreal -it87 -knc_one -kworld -leadtek_0007 -leadtek_0010 -leadtek_pvr2000 -livedrive_midi -livedrive_seq -logitech -macmini -mceusb -mediafocusI -mouseremote -mouseremote_ps2 -mp3anywhere -nslu2 -packard_bell -parallel -pcmak -pcmak_usb -pctv -pixelview_bt878 -pixelview_pak -pixelview_pro -provideo -realmagic -remote_wonder_plus -remotemaster -sa1100 -sasem -sb0540 -serial -serial_igor_cesko -silitek -sir -slinke -streamzap -tekram -tekram_bt829 -tira -ttusbir -tuxbox -tvbox -udp -uirt2 -uirt2_raw -usb_uirt_raw -usbirboy -usbx -userspace -xboxusb"
Notice
Building support for more than one device may cause various problems with the drivers interacting badly with one another. It's best to have one device selected, and only use that device.

Configuring LIRc

By default, if it's the first installation, the configuration file LIRc.conf is generated automatically. However, most likely, you will have to fine-tune it anyway. If your hardware is mceusb2 compatible, you can use the attached configuration file., which I found here (thanks to whoever wrote it).

Notice
If you have configs for other systems, and want to contribute, let me know.

Finalizing LIRc installation

Finally, don't forget to add the lirc_mceusb2 to the autoload list:

echo "lirc_mceusb2" >> /etc/modules.autoload.d/kernel-2.6

And lircd to automatically start at boot:

rc-update add lircd default

Testing LIRc

To test LIRc, you can use irw. If the necessary kernel modules aren't loaded yet, and LIRc is not started yet, do this first:

modprobe lirc_mceusb2
/etc/init.d/lircd start

Next, run irw, and check its output. It will verbosely display whenever a valid IR signal is received.

That's all for the moment. Once MythTV is installed, we will map the buttons to the various functions of MythTV, and configure the LIRc part a bit more.

Installing and configuring LCDproc

This part will even be more optional: configuring an LCD panel. My system has a CrystalGraph iMON LCD display built in, but this one is currently not supported by LCDproc or the GraphLCD project.

Notice
If anyone knows otherwise, please let me know.

Luckily, I also have a CrystalFontz 634, externally in a case, and connects to my system using USB:

To use the display with MythTV, LCDproc is required: this is a daemon framework with internal drivers that allow applications to connect to it, and send data to display, regardless of the hardware being used.

Again, like with LIRc, determine what hardware you have, then edit make.conf, and add a new configuration parameter for LCDproc: LCD_DEVICES.
In my case, I added this:

LCD_DEVICES="cfontz cfontzpacket cfontz633 ncurses text imon graphlcd"

Installing LCDproc

Next up, install lcdproc:

emerge -av lcdproc

Notice the output (the red flags): those are the devices for which support will be built:

Quote
app-misc/lcdproc-0.5.2-r1 USE="joystick lirc nfs samba usb -debug -doc -irman -seamless-hbars" LCD_DEVICES="cfontz cfontz633 cfontzpacket graphlcd imon ncurses text -bayrad -cwlinux -ea65 -eyeboxone -g15 -glk -hd44780 -icpa106 -iowarrior -lb216 -lcdm001 -lcterm -md8800 -ms6931 -mtcs16209x -mtxorb -noritakevfd -picolcd -pyramid -sed1330 -sed1520 -serialpos -serialvfd -sli -stv5730 (-svga) -t6963 -tyan -ula200 -xosd"

A bit of explanation is probably required with some of these USE flags:

  • usb: adds USB support. You need this if your display device connects via USB.
  • Other flags: the other flags are added because of usage with other devices. I don't really know what they do in LCDproc (if someone know, let me know).
Notice
Unlike with LIRc, it is absolutely not a problem to connect and use multiple displays.

I've added several other flags in LCD_DEVICES:

  • cfontz, cfontz633, and cfontzpacket: pretty logical in my case; however, it wasn't clear as to which flag the CrystalFontz 634 display belongs to, so I added all CrystalFontz flags.
  • graphlcd and imon: added these flags in the hopes of having iMON LCD support. At the time of writing, imon adds iMON VFD support (which, according to info on internet, should work), and graphlcd is an own driver set for graphics-based LCD displays, which could get iMON LCD in there in a future release. If you are sticking with CrystalFontz (or another, text-based, LCD display), you can leave these flags out.
  • ncurses: adds support for a virtual ncurses based display. This is optional, of course.
  • text: not sure what this does: I believe it adds support for text-based LCD displays (so I guess it should be enabled at all times), but feel free to correct me.
Notice
An additional note about the seamless-hbars USE flag: depending on the locales you will be using, you can enable this flag to have seamingly looking horizontal bars.
If your locale is set to anything other than UTF-8, this might draw really funny things on your display, though.

Configuration of LCDproc

Configuration of LCDproc is done in /etc/LCDd.conf. Unlike with LIRc, this config file is not generated at installation, so you have to edit it manually. This, however, can be quite complex. I've attached my own configuration file for my CrystalFontz 634 USB. For other displays, it's recommended to read the comments added in LCDd.conf, and check the documentation on the LCDproc website.

Notice
If you have specific configuration files for other displays, and wish to share them, please let me know.

Finalizing the LCDproc installation

To add LCDproc to automatically start at boot, execute this:

rc-update add LCDd default

Testing LCDproc

Testing is fairly easy. If LCDd.conf is edited correctly, you should be able to start the LCDproc daemon without any trouble:

/etc/init.d/LCDd start

Your display should be filled up with the standard server screen, showing the current status of connected clients and screens (= displays). If it shows correctly, then the hardware side of the LCDproc installation is in order. To make sure clients can connect to the daemon, check whether the daemon listens on the right port:

netstat -ptan | grep LCD
tcp        0      0 127.0.0.1:13666         0.0.0.0:*               LISTEN      29742/LCDd

If the output of the command above provides with the output above (aside of the PID, of course), then all local processes will be able to connect.

If you want to use the display exclusively with MythTV, like I do, the configuration of LCDproc ends here. Skip to The Simple Guide to a Media PC (page 7) for the next step in the configuration process.

Optional: display system stats, instead of MythTV stats

LCDproc has a built-in client to display system stats, and is installed automatically with the merge of LCDproc.

To use, start the lcdproc client daemon:

/etc/init.d/lcdproc start

To have it start at boot, run this:

rc-update add lcdproc default

To configure which stats to display, edit /etc/lcdproc.conf. For more information about setting this up, check out the documentation at the LCDproc website: http://lcdproc.org/docs.php3.

Alternatively, you can use my config (attached) as well.