Archive for June, 2011

Photography: Tethering to a Linux Netbook

So, I’ve been playing around with my Nikon D80.

Having been kindly given a tripod to play with I decided to practice with some still-life to help familiarise myself with the settings. To make things a little easier and to be extra-geeky, I decided to hook the camera up to my netbook. This should make viewing the shots easier and transferring the photos directly to a computer would save work later.

The expensive software by Nikon is not available for Linux, so I searched for something else and discovered GPhoto2.

GPhoto2 is an excellent piece of software. Commandline based with an optional ncurses UI, it is very simple but extremely versatile. It supports a huge variety of cameras, including full support for my D80.

I run Ubuntu, so installed GPhoto2 by typing:

sudo apt-get install gphoto2 dcraw netpbm gtkam gthumb

The last three being optional but recommended.

Next, I turned on my camera and set it to PTP USB mode (rather than the default mass storage mode).

Then it was just a matter of attaching the camera to the netbook with the supplied usb cable and asking Ubuntu not to mount it when prompted.

To take a photo simply type:

gphoto2 --capture-image-and-download

I found the following options useful to play with:

  • --force-overwrite Get rid of the annoying prompt asking if you want to overwrite an existing file (by default, files are always called capt0000.jpg)
  • --hook-script Customise the behaviour of gphoto by scripting some of the actions. In particular, to automatically open downloaded files. There’s a sample script at /usr/share/doc/gphoto2/
  • --filename photo001.jpg Provide a custom filename. Useful if you don’t want all your files to be called capt0000.jpg
  • --config A graphical menu of the many settings it is possible to customise.

The first photo always takes a bit longer as gphoto initialises the camera. After that it seems fast and reliable. Copying the photos to the computer and opening them in eog or gthumb was rather slow on my netbook though.

I found it simple enough to get the hang of and well worth having a play with!

Leave a comment