Skip to content

libgphoto2 based FUSE filesystem

Merry Christmas, Happy New Year, etc, etc.

I’m currently in Singapore visiting my family for the holidays and I finally caved in and bought myself a digital camera, which happens to be a Canon Ixus 55. It’s all nice and shiny but it doesn’t support the USB Mass Storage class, which means I need to use libgphoto2 based tools to interact with it. So, I thought to myself that there ought to be a FUSE filesystem based on libgphoto2 that handles this. And, in fact, Christopher Lester wrote one. But it doesn’t use libgphoto2 directly, and instead interacts with the gphoto2 command line tool which makes it a bit clunky. As Christopher has no plans to change this, I decided to write a filesystem that did use the library, and I now have a happy 0.0 release here.

As you might imagine, it’s very basic at the moment, but allows you to retrieve and delete files which is the majority of most people’s interactions with a camera. Deletion is very slow for reasons I don’t currently understand, but it does work.

The implementation is rather interesting because the libgphoto2 (cameras in general?) model doesn’t map to filesystem operations terribly well, particularly in the separation of file and directory iteration and the all-or-nothing approach to file access, which should make implementing writing files to a camera rather interesting. As a result, anyone looking at this code will probably be entertained.

And yes, if you read hub’s announcement of the latest libgphoto2 release, you may have noticed that it now exposes mounted Mass Storage class devices. While you could then turn around and mount those using gphoto-fuse, I probably wouldn’t recommend it. :-)

{ 7 } Comments

  1. Johannes Berg | 28th December 2005 at 04:46 | Permalink

    Nice. The download is rather unintuitive though — a tar.bz2 named tar.gz :)

  2. Philip Langdale | 28th December 2005 at 06:02 | Permalink

    Whoops. I’ve renamed the file. Thanks.

  3. Emily B. | 28th December 2005 at 06:50 | Permalink

    i would adore such a filesystem. see, i have a media player that uses MTP, and i’ve just discovered that i can access it with libgphoto2 only, which is extremely awkward and doesn’t let me use it with any programs like media players.

    i was going to write a kioslave to access it, but this would be infinitely better… i’m going to take a look and maybe pitch in, as writing files to the ‘camera’ would be infinitely valuable.

    keep up the good work ! i just wanted to let you know there’s a really good use to put this towards, if anything becomes of it.

  4. Anonymous | 28th December 2005 at 10:01 | Permalink

    Nice, I really like FUSE as an alternative to gnome-vfs and KIOslaves – KDE already has a kamera:/ kioslave BTW (just in case you’re interested in looking at the code or something)

  5. Ikke | 29th December 2005 at 02:12 | Permalink

    “404 not found” on http://intr.overt.org/gphoto-fuse :(

  6. Philip Langdale | 29th December 2005 at 02:25 | Permalink

    I renamed the directory and package to ‘gphotofs’ to keep consistent with the binary name. My blog post about the 0.1 release points to the new location.

  7. Christopher Lester | 20th February 2006 at 03:24 | Permalink

    Ah — well done! Good work.

    I’m pleased to see someone has taken up the challenge of doing things properly. My http://www.hep.phy.cam.ac.uk/~lester/gphoto2-fuse-fs/ implementation was certainly rather clunky (as you rightly said) and waiting for someone to do what you have done.

    I’ll put a link to you on my page.

Post a Comment

Your email is never published nor shared. Required fields are marked *