How to make FreeBSD talk to a Fujifilm X-E1

Believe it or not, I finally bit the bullet and got myself a digital camera. I had to realize that my current state of affairs no longer allowed me to pursue a hobbyist's career as a large format photographer. I barely found the time to shoot negatives, and my current appartment does not allow to easily set up a large format darkroom. A recently unveiled system camera, Fuji's X-E1, finally convinced me to go digital. Problem is, how to access and process the images on my tried-and-true FreeBSD box?

For the time being I wanted to archive JPEGs although I record RAW images in parallel (I'll get back to processing RAW images as soon as I figure it out). First I looked into a simple image organizer which did not require to install most of KDE on my slim Xfce box. I gave Shotwell a try and found it simple yet sufficient for my current needs. However, although the program uses libgphoto2 which in turn recognizes my camera, Shotwell wouldn't let me access the camera directly. I couldn't find an option to tell Shotwell where to look for the camera, and all dbus or hald based efforts did not seem to work out.

What should work though is to import the images from a folder. All I needed to do is either to mount the camera as an external drive, or to transfer the images to a temporary directory. Mounting the camera as an USB drive does not work though. Next I tried gphoto2, the libgphoto2 library's command line utility. This basically worked and allowed me to access the images, but the most useful option (transfer *new* images only to a temporary directory) again did not seem to work. gphoto2 always insisted on transferring all images which didn't sound like much fun.

Finally I stumbled across a gphoto extension which allowed to mount PTP-aware cameras as a file system in userspace using Fuse. I'll briefly describe the setup that made things work.

First we need to tune the USB ports to gain read and write access for non-root users. I use a group called "operator" for purposes like this. E.g. members of this group are also allowed to mount CDs and DVDs. To make USB ports work for us, we need to have the following minimal setup in /etc/devfs.rules:

add path 'usb/*' mode 0660 group operator

Unless you already have an entry like this in your setup, you have to add the following line to /etc/rc.conf:


To make these changes immediately effective without a reboot, run the following as root:

wombat# /etc/rc.d/devfs restart

Now any tools that need read-write access to USB ports should work for members of the operator group. Make sure you're member of this group by running:

[markus@wombat ~]$ groups
markus wheel operator dialer network

Next we need to know where the camera shows up when we plug it into the USB port. The following command, run just after you plug in and switch on the camera, should tell (irrelevant output lines purged):

[markus@wombat ~]$ tail -10 /var/log/messages
Dec 29 23:02:04 wombat root: Unknown USB device: vendor 0x04cb product 0x0283 bus uhub7
Dec 29 23:02:04 wombat kernel: ugen7.3: at usbus7

Now we need to see if libgphoto2 can handle this camera, and how it exactly calls the port in question:

[markus@wombat ~]$ gphoto2 --list-ports
Devices found: 4
Path Description
ptpip: PTP/IP Connection
usb:/dev/usb,/dev/ugen7.3 Universal Serial Bus
usb:/dev/usb,/dev/ugen7.2 Universal Serial Bus
usb:/dev/usb,/dev/ugen2.2 Universal Serial Bus

We know from the previous command that the second entry in this table is the camera. Now we have all informations at hand to actually mount the camera:

[markus@wombat ~]$ gphotofs --port=usb:/dev/usb,/dev/ugen7.3 /stick/markus/

where /stick/markus is a directory where the current user has full permissions.

Now we can drag&drop the files from a file manager or an image viewer into Shotwell to import them into the database. Shotwell allows to either copy the images, or to just register the file information along with their current paths. As we import the images from a removable storage, we want to copy the images to the hard drive.

When done, unmount the drive as usual:

[markus@wombat ~]$ umount /stick/markus


Dave Pawson meint:

Try dcraw, cmd line tool for raw conversion?

Sonntag 30 Dezember 09:05

mhoenicka meint:

I'll sure give it a try. There's a couple more options, like RawTherapee ( which may already support the X-E1 as well. I'll try a few options, as support for this camera is likely to increase in the next couple of months.
Montag 31 Dezember 00:04

Mein Kommentar

Dieser Artikel ist geschlossen. Keine Kommentare mehr möglich.