Combining LIRC, XMMS, GRIP, VNC and some BASH scripting Since I have a server (paris) that is always on, I figured I could turn it into a music server, aside from being an internet/file/print/scan server. The real 'problem' in my situation was twofold: first, the server is headless mouseless and keyboardless; second, it resides in a different room than the HiFi that I wanted to connect it to. Luckily, there is such a thing as LIRC (Linux Infrared Remote Control), which allows you to use almost any IR remote control to give commands to the programs on your computer that have a plugin for LIRC. I had some experience with LIRC due to my Hauppauge WinTV-FM (which, btw is very well supported in Linux, so don't let the product name fool you - check my configuration page to see how to set that one up with LIRC) that comes with its own IR remote sensor and remote control. This time around, I had to build my own IR receiver, since the server had none, and I wasn't going to put a TV-card in my server just for the IR eye. Also, the Hauppauge IR receiver only lets me use the IR remote control that came with it; I know it says (for instance in the LIRC FAQ) that the Hauppauge remote receivers should also function with any RC5-standard remote, but I tried with the various Marantz (CD-50) and Philips (Garbo Projector remote) remotes that I have lying around here, and they just don't work with the Hauppauge IR receiver. Moreover, the living-room HiFi is a Denon, which has a remote that uses a different standard altogether. Apart from the remote control issue, I would normally set my audio program to 'random' or 'shuffle' mode (naturally, I would want to be able to toggle the playback mode with the remote as well). But this would mean that with lots of songs, it may not always be clear which song is being played, from which artist or album. So I wanted to have a means to check, instantaneously or later, which songs got played. Since I have no displays in the living room (not even a tv), and the server has no display either, the options I had were: - to also get a display that would 'advertise' the name of the current song
- create a way to check with the computers with a display (machines zurich and neuchatel) which song was played at a certain time
So all in all, it became clear to me what I had to do, I only had to figure out how to do it. With google and some man-page reading, I figured things out and so I: - got 10m of audio cable to connect the audio server with the HiFi system
- got the parts and assembled (soldered) a LIRC serial port receiver
- installed and configured LIRC
- setup xmms to respond to my remote control
- used the songschange plugin and a shell script to create a playlist of the songs that were played
Connecting the audio server with the HiFi system was straightforward; I just got 10m of (male-cinch to male-cinch) audio cable (which was just long enough), clipped the cinch connectors off of one end and substituted that for the mini-jack that fits into the audio output of the soundcard in the server. If you don't want to modify your cable, you can also get a connector with cinch on one end and a mini-jack on the other; you can find those at most computer stores. In my case I had to cut off the connectors on one side anyway to fit through a hole in the wall. Before jumping into details, just a little note: I use Mandrake 9.2, but this should not be very different for other Linux distributions. So if you want to do something similar with another distribution just replace the Mandrake specific things with the equivalent of your distribution (in Mandrake, urpmi / RPMDrake is for program installation, MCC is for system configuration).
source: www.mandrake.tips.4.free.fr
|