MP3 Terminal

Most or all of the MP3 Players for your Home Stereo either require you to turn on your Television and make it necessary to use a clumsy remote control or have small displays making my eyes tear. Then the next problem is that all mp3 players work on a per track basis so you always try to put together your playlist via drag and drop or marking all tracks of an album. On the other hand you take a CD, put it into the CD player and press play - Done.

So i wanted to have a simple, easy to use MP3 Station for my Living Room. I got a Partnertech PT-5500 Cash Register which is a Via C3, 256MB, 15" TouchScreen System.

The first problem is that the PT5500s Board has an onbord via sound but its not reachable from the outside. The solution is a 15€ USB Sound Device which plugs into the USBs on the back.

As MP3 Playing software i used MPD which is a headless, network controllable mp3 playing daemon. As a frontend i used GMPC which is not a very good touch controllable mpd frontend but its a little tweakable to make it work

The Display is connected as a DFP which makes OpenChrome need a LCD option - confusing and took me a day to find out:

Section "Device" Identifier "Configured Video Device" Driver "openchrome" Option "ActiveDevice" "LCD" Option "PanelSize" "1024x768" Option "ForcePanel" EndSection

The touchscreen is a eGalax USB Touchscreen which uses the usbtouchscreen kernel driver together with the xserver-xorg-input-evtouch xorg input driver. You'll need to calibrate the driver and get its touch limits. I used this tool This outputs min/max x/y you'll need to put either into your config or into a hal fdi policy file.

Section "InputDevice" Identifier "touchscreen" Driver "evtouch" Option "Device" "/dev/input/by-id/usb-eGalax_Inc._USB_TouchController-event-if00" Option "DeviceName" "touchscreen" Option "MinX" "168" Option "MaxX" "1560" Option "MaxY" "217" Option "MinY" "1589" Option "ReportingMode" "Raw" Option "Emulate3Buttons" Option "Emulate3Timeout" "50" Option "SendCoreEvents" "On" EndSection

Or the hal policy file i put into /etc/hal/fdi/policy/egalax.fdi

<?xml version="1.0" encoding="UTF-8"?> <deviceinfo version="0.2"> <device> <match key="info.product" contains="eGalax"> <match key="info.capabilities" contains="input"> <merge key="input.x11_driver" type="string">evtouch</merge> <merge key="input.x11_options.minx" type="string">168</merge> <merge key="input.x11_options.maxx" type="string">1560</merge> <merge key="input.x11_options.maxy" type="string">217</merge> <merge key="input.x11_options.miny" type="string">1589</merge> <merge key="input.x11_options.taptimer" type="string">300</merge> <merge key="input.x11_options.longtouchtimer" type="string">600</merge> </match> </match> </device> </deviceinfo>

The real trick is to get taptimer and longtouchtimer to correctly get double-click and drag for the sliders to work.

Then i created a jukebox user which logs in automatically via gdm and has this .xsession:

xfwm4 & xscreensaver -no-splash & gmpc --clean-cover-db gmpc --fullscreen sudo poweroff

This basically starts a window manager, starts gnome-screensaver (which needs to be configured to blank quickly) because you wont need it after selecting music, cleans the failed cover database (to try reloading) then runs gmpc. If you quit gmpc is runs poweroff and thus turns of the terminal. Just setting dmps and blanking via xset is not enough as then the unblank events e.g. clicking/tapping the screen will be passed to the application which makes it play a random album below the finger you couldnt see before.

To make the scrollbars usable on a TouchScreen i tweaked the GTK theme a bit like this:

jukebox:/home/jbox# cat .gtkrc-2.0 style "scroll" { GtkRange::slider-width = 30 } class "*" style "scroll"

To make the gmpc more CD Player like i installed the gmpc-plugins Debian package which also brings the Albumview Plugin. Then i tweaked the .gmpc/gmpc.cfg to make Albumview the default view which comes up after start. This can be done by setting the "Position" argument.


My stripped down gmpc and gmpc-plugins (albumview) code can be found in a git tree of the current (20091228) squeeze packages.


Original and patched versions Screenshot

Screenshot Original Screenshot Patched