For an embedded/thin client project without GNOME, KDE, or even full XFCE I needed a small daemon to automount USB sticks. Using the full gvfs/gdu/nautilus or Thunar stack is too heavyweight for my purposes, but a simple udev rule just doesn’t cut it — I need to mount these USB sticks for a particular user (permissions), and also want to do an action like pop up a window with the contents.

This finally provided me the opportunity to write something bigger than just a 10 line demo in Vala (well, it’s not that much bigger admittedly :-) ). Since that is my first real Vala project, it took quite a lot longer than anticipated; some areas of Vala are still a bit underdocumented, e. g. I spent some half an hour trying to find out how to set a result callback for an asynchronous function invocation. Mikkel Kamstrup Erlandsen suggested to just use a wrapper instead which uses yield, which works fine indeed. Mikkel, thanks for bearing with me!

Anyway, here it is:, complete with a first release, bzr branch (lp:udisks-automounter), and a package for Ubuntu 10.04 LTS in my PPA.

For avoidance of doubt, this won’t ever make sense on a GNOME/KDE/XFCE desktop, which already have their (much better developed) automounting services. But perhaps it’s useful for someone else with similar constraints.