Personal Kiosk Project, Part I

One of the things I've been wanting to build is a personal touch screen kiosk-like thing where I can quickly access information (weather, movie times, etc) as well as listen to music, make a phone call, view photos and various other things. I recently had the opportunity to play with a Eee Box PC at work, so I thought this was a great platform on which to build this kit. The Eee Box features a 1.6GHz processor, an 80G hard disk and 1GB of RAM (although I ended up upgrading to 2GB).

After purchasing the Eee Box, the next thing I needed was a decent touch screen. These can be rather expensive. I hunted around for a while, but in the end I just got lucky. I found a 3M M150 15" touchscreen on Ebay for a real bargain. This has a really nice capacitive touch screen, embedded speakers/microphone and supports both Linux and Windows. Many monitors have mounting screws on the back for mounting on walls, or for attaching thing clients. The Eee Box also comes with a mount specifically for this purpose, what a great combo!





M150 Touchscreen with Windows

I first started testing the touch screen and implementing things using Windows. Because I work for Microsoft I actually had access to try Windows7. Amazingly, it worked pretty well, and the touch screen drivers - designed for Vista of course - worked perfectly. I ultimately ended up using Ubuntu because I had other things I wanted to toy with, but there was no technical advantage here. One hint: use the 32-bit version of Windows and the driver. Since this was a Eee Box with 2GB RAM this was a no brainer, but I can say that the 64-bit driver doesn't work nearly as well.

This was an interesting project for me. I've always been a fan of Linux, but I encountered some very interesting challenges/annoyances with this project that I hadn't foreseen. After prototyping this project in Windows and Linux, I found that it would have been far easier to use Windows, even the pre-beta Windows7 I had would have worked just fine. Ubuntu is great, but I just ran into a bunch of little annoying issues (which I'll outline later).

M150 Touchscreen with Ubuntu

One major problem I ran into with Ubuntu were the touch screen drivers. The originl driver for this screen was distributed as a kernel module (with source code), and a closed source XF86 driver. The kernel module didn't compile properly under recent kernels, so I had to do a little hacking to get the module compiled. Sadly, even when I got the module compiled, the XF86 module wouldn't load properly with the Xorg version distributed with Ubuntu 8.04 or 8.10.

So, I emailed 3M and asked for help. Amazingly, they responded by providing me an unreleased driver. This new driver removes the need for a kernel module, and has an updated driver that is supposed to work with Xorg. Unfortunately, the driver does not work properly with the version of Xorg distributed with Ubuntu 8.10, but does work with Ubuntu 8.04 (Xorg version 1.4.0.90). This updated driver is now available on 3M's website.

So, that's great. Now I have a working, and fairly recent version of Ubuntu with a killer touch screen! Woot! But wait, this was quite an effort. Why is it that I was able to get the touchscreen working immediately with an older driver and a pre-beta version of Windows (Windows7), but had a difficult time with Ubuntu - and it still doesn't work with 8.10? I suppose one could blame 3M for this, but I don't think they deserve all the credit. We all know kernel developers (and apparently Xorg developers) don't have much sympathy for closed drivers, and so break interfaces and change things quite often. I can't argue if this is right or wrong, all I can say is that it's fricken annoying sometimes.

The Interface

After getting the touch screen working, most everything else was pretty easy. I got the Intel driver working with Ubuntu 8.04 and Compiz-Fusion. Interestingly, this was a bit of a task in 8.04, but worked out of the box in 8.10. There's a big bug report about this, but the long/short of it is that one needs to explicitly disable LVDS in the xorg.conf file.

Wireless was also a hassle, but again it worked fine after installing a new driver (pretty easy, plenty of posts and reports about this issue as well). I then installed the Avant Window Navigator, which is a launcher/task bar replacement. This provided a nice-looking launcher for all the applications to which I wanted access.

After configuring Avant, I then installed these nifty things called Screenlets. This provides an architecture for folks to write little applications that sit on the desktop, similar to Vista Gadgets or OSX Dashboard. Very handy for things like weather and stock reports.



Annoyances

Ultimately I'm pretty happy with the outcome. Besides the aforemented driver issues with the touch screen, Intel video and wifi, there are a couple Linux-specific things I still need to solve.

The first is the most idiotic. Of course, I don't want to leave this thing turned on all the time, so I would like it to got to sleep after some time. GNOME, unfortunately, will sleep even when playing internet radio (or Pandora or similar) via Firefox. There are plenty of bug reports as well about this involving VLC and other media players. Apparently the fix is to have the application inform GNOME that it should not sleep. Wait, what? So, every application that could possible play music/video needs to inform the GNOME that it's doing so? Shouldn't GNOME just detect this? Seems backward to me. Yet another thing I wouldn't have ever had to deal with in Windows.

One solution might be to periodically test to see if the sound is working and send a message to gnome-power-manager to not sleep. One can check the sound card via a shell script like the following:

    if cat /proc/asound/card0/pcm*/sub0/status | grep -qs RUNNING ; then
echo "Sound is running!"
fi

I haven't tested this yet, however, but if I do I'll post a followup on this. Unfortunately, sleeping is mostly a moot point since after waking up the sound no longer works at all... great.

One other annoying thing is that in order to make a phone call through Ekiga, I cannot just pause the internet radio or Pandora or whatever. I actually need to close the browse. Annoying, but not a huge deal.

Anyway, this is an awesome project. A little pricey, but a really handy tool to have around. I've already coded up a script so that this little box reads the news to me in the morning, and audibly tells me the weather and other information. The possibilities are limitless!