Viridian/Ampache local control

Recently at work I've been using Viridan to listen to music at work. It has its warts, but generally works pretty well. There's even an XMLRPC server built in, so you can control it remotely. However, there's not a huge number of clients out there, so I wrote my own little script so that I could start and stop it from a Qtile keybinding, and I thought I'd put it up here for anyone else who is interested. Here's an example session:

smitten:~$ ./ 
./ [rpc_call(s)]
   availible methods are:
smitten:~$ ./ get_current_song
{'artist_name': 'Meshuggah','song_title': 'Stengah', ...}
smitten:~$ ./ next

Hopefully someone else finds it useful :-)

Photos from my Colorado adventure

Hello! I just completed another successful two and a half weeks touring the Colorado mountains. Although the snow was not great (Winter Park only has around a 15 inch base, and over half the mountain was closed), I still had a good time! Rather than do a lot of aggressive skiing (the conditions would have made aggressive skiing fairly dangerous), I tried a bunch of new things instead! The most interesting new thing was probably the ski bike, and I am now a licensed snow cyclist! My dad and I both took lots of pictures, and he's posted both the ones from his camera and my camera on his web page.

I did three summits during the trip, two of Mt. Charles which is roughly 12,050 feet, and one of Mt. Prospect which is roughly 11,700 feet. I took a panorama (which I've yet to stitch together) of the view on Mt. Prospect, and my dad took one of Mt. Charles, so eventually when we get those stitched together, I'll post them as well. Anyway, if you're heading out west, here's to hoping you have more snow than we did! Even though the backcountry was bare in spots, we still had a lot of fun goofing around (you might notice some defilement of a USGS marker in the photos ;-).

Installing Qtile on Ubuntu 11.10 (Oneiric Ocelot)

Recently, there has been some discussion on qtile-dev about installing the latest and greatest version of qtile. Unfortunately, the install process has historically been a journey into dependency hell, since distributions didn't have the latest versions of some libraries required by qtile. The good news is that this has mostly been fixed (although very few documents anywhere state this), so it's hard to know what to install by hand and what you can use packages for.

To complicate matters more, there are several versions of xpyb floating around, none of which have working build systems! If you knew enough about pkg-config and weren't afraid of manually installing files, you could get everything to work, but it did bar the "normal user" from installing qtile. Hopefully this blog post will clarify a few things.

First, what dependencies do you need to install? Contrary to what the docs say, in 11.10 (and presumably later versions of Ubuntu), you don't need to build your own cairo or xcb. You can simply:

sudo apt-get install xcb-proto libxcb1-dev python-xcbgen

You will have to build three things by hand: xpyb, py2cairo, and qtile itself. The other day I sat down and fixed the build system for xpyb, so you should be able to just:

git clone git://
cd xpyb-ng
sudo python install

After that, you'll need to install py2cairo. The waf based build doesn't appear to detect xpyb correctly, so you'll need to go the autoconf route. Even with autoconf, the build system is slightly broken, so you'll need to be explicit about what directories to look in for xpyb.h. If you used the above build of xpyb, you can:

git clone git://
cd py2cairo
CFLAGS=-I/usr/local/include/python2.7/xpyb ./configure
sudo make install

Then, you can clone your favorite qtile repo and everything should Just Work! If you want to clone my copy of qtile (which includes several bug fixes and enhancements):

git clone
cd qtile
sudo python install

If you have any questions or problems, feel free to mail qtile-dev or me directly. I am going to try and package qtile and put it in a PPA, but I doubt I will get to that for another few weeks. This should help anyone who is interested enough to build it in the meantime, though!