Tethered shooting on Ubuntu Linux using gPhoto2

Photo by Jacob Garcia

My D70, like most digital cameras, has a USB port that allows me to connect it to my computer and download photos. Many cameras also allow you to control them using your computer when they are connected. This is called tethered shooting. You click the shutter and a few seconds later the photo is displayed in all its glory on your big screen monitor. This can come in extremely handy in studio situations. It’s a great trick for quickly checking that you’re capturing the shots you want without squinting at a 2 or 3 inch LCD.

On a lark it occurred to me to do something goofy with my camera (more on that in a minute). On the way to crazy town I came up with a way to do basic tethered shooting on Linux.

I’m using Ubuntu Linux but, in theory, this should work on any Linux system that can run gphoto2. gphoto2 is a magical command line utility that lets you control your camera connected via USB cable. With it, you can download photos and even cause the camera to capture images. To install it on Ubuntu, start Synaptic and search for gphoto2.

Next, download the following scripts: Download

(These scripts are all open source and I’m releasing them under a BSD license which basically means you can do whatever you want with them.)

Uncompress them into a new folder or put them somewhere on your path. Then right click each file, open its properties, and select the Permissions tab. Make sure the “Execute” checkbox is checked.

Then, connect your camera to your computer using a USB cable, turn it on, and run the tether script by double-clicking it and choosing Run in terminal (you can do all of this at the command line as well but I figure you command line guys already know that).

Now take a photo. If all goes well, you should see it download the photo into the folder and then display it for you. Your results may vary. I’ve tested this setup with exactly one camera. If all does not go well (and let’s face it, the probability of that is definitely not zero), take a look at the troubleshooting suggestions in the README file included in the download.

So what was the goofy idea that prompted all of this? I wanted to see if I could connect my camera to my microphone. The soundtrigger script in the download works the same way as tether except it takes the photo for you when you snap your fingers. Literally. I told you it was goofy. I can’t think of many good uses for that. Maybe if you have a laptop you could set up the whole contraption outside next to a bird feeder…

By John Watson

John is the original founder of Photodoto, but after running it for 4 years he had to focus on different things. If you're interested in what John has been up to recently, you can check is personal blog or browse his photo blog.