FreeBSD + darktable + Nikon D5100

Here's how to get you Nikon D5100 (and probably all sorts of other cameras) to cooperate with graphics/darktable on FreeBSD:

1) Verify that you camera is supported
1.1) Install graphics/gphoto2
1.2) Attach you camera to you Computer with usb cable.
1.3) run gphoto --auto-detect as root
The output should be similar to this
Code:
Model                          Port                                            
----------------------------------------------------------
Nikon DSC D5100 (PTP mode)     usb:002,002
2) Install graphics/darktable

3) Configure FreeBSD device rules
3.1) Figure out usb device to which camera is attached
Code:
$ dmesg
...
ugen2.2: <NIKON> at usbus2
$ ls -lFh /dev/ugen2.2
lrwxr-xr-x  1 root  wheel     9B 10 Jan 22:50 /dev/ugen2.2@ -> usb/2.2.0
3.2) Add this rule to /dev/devfs.rules
Code:
add path usb/2.2.0 mode 0660 group operator
Anyone know any better way to achieve this?

Make sure you're in operator group.

4) Reboot

You're done. If you open darktable you should be able to find you camera with "import -> scan for devices"

I was very happy to find out that my new camera worked with FreeBSD :)

References:
http://www.darktable.org/usermanual/ch04s04.html.php
devfs.rules(5)

P.S.
After you configure FreeBSD you can also use graphics/fusefs-gphotofs to access files on camera.
just mount it with.
Code:
$ gphotofs ~/mnt

Note that vfs.usermount=1 must be set in order to mount it to ~/mnt.
 
USB devices almost require using devd.conf(5) because they are dynamic. It could even start programs and automatically download the files when the camera is connected.

I just use a card reader. It's faster than the camera and doesn't run the battery down.
 
Yes, I need to buy a card reader myself. However having the option to work directly with the camera can also be useful. :)
 
I've accessed the pictures on a Nikon DSLR by CLI (see the off-topic subforum) [ FreeBSD as photographers workstation ], 2012, where a small howto is posted within the thread.
 
I tested it with my Sony DSC-T10 and it works like a charm.
Code:
# gphoto2 --auto-detect
Modelo                         Puerto                                          
----------------------------------------------------------
Sony DSC-F707V (PTP mode)      usb:000,003     
Sony DSC-F707V (PTP mode)      usb:002,003
I added this rule in /etc/devfs.rules
Code:
% grep -i usb /etc/devfs.rules
add path 'usb/*' mode 0666 group operator
Thanks for this useful guide, @graudeejs :e
 
Last edited by a moderator:
I've just tested this with my Sony a6000. It works.
You just need to set camera to PC Remote USB Connection mode (Menu -> Settings -> 4th tab -> USB Connection)
 
Back
Top