Using a digital camera with Linux

Most PC users don't associate the Linux operating system with digital photography, or graphic manipulation. In this column, we take a look at how to connect your digital camera to your PC and download the files using Linux. We will also get your digital snaps organised and step you through using an image application - Album - to publish the photos.

Interfacing with a digital camera

Most USB digital cameras can be accessed using Linux with an application known as gPhoto (, which currently supports 162 digital cameras. The latest version of gPhoto has been included on August's cover CD.

Once installed, accessing your digital camera with gPhoto is very easy. gPhoto is a command-line application, so you will need to open a shell. To test if gPhoto is working with your camera, first plug your camera into a USB port and turn it on. Once started, type the following:

$ gphoto2 --auto-detect

This command will search for any supported cameras and return the model name of your camera if it is found. Once you have this information, you can access the camera. To test your camera, type the following:

$ gphoto2 --camera --summary

Now the photos can be extracted from the camera. To copy all the photos from the camera to the current directory, type:$ gphoto2 --camera --get-all-filesThere are a large number of commands offered by gPhoto. To obtain a list of them, type the following:

$ gphoto2

Storage-based cameras

Some digital cameras can not be accessed by gPhoto. They act as storage devices (like another hard disk) and can be accessed using Linux's built-in USB driver. Once the camera is plugged in and turned on, you can access it as you would a normal disk. If you have no SCSI disks, your camera will be accessible as /dev/sda1; if you have one SCSI disk it will be /dev/sdb1, and so on. To access the camera, type as root:

$ mount /dev/sda1 /folder/to/mount/under

Getting started with Album

Included on August'ss cover CD is a handy photo album application for Linux and Windows called Album ( Before installing Album you must first install ImageMagick, available from Following this, copy Album to /usr/local/bin and make it executable:

$ chmod +x /usr/local/bin/album

Basic album building

Album uses the directories on your hard disk as a structure for building photo albums, and sub-directories are built into sub-albums. Organise all your photos into directories, each directory corresponding to an album. Once you are happy with your organisational structure and are ready to build the album, in the base directory type:

$ album

Album will create an index.html file in the current directory from which you can view the photo album.

This first photo album is pretty basic, lacking features such as comments and having quite a bare overall layout. Adding comments and titles to images is easy and can be done in two ways. You can create a text file containing the comment in the same directory as an image, using the same name but changing the extension (.jpg, etc.) to .txt. Or, it is possible to store all comments in a single file called captions.txt. This file has three fields: filename, title and comment, each separated by a tab. An example line in this file is:

soccer.gif-> At the Soccer-> Just after they scored!

Album also allows you to customise the look of your photo album. Perhaps you want bigger thumbnails? This can be accomplished by adding the -geometry XxY option to the Album command. The default thumbnail size is 133x100. You can make this bigger, for example, by typing:$ album -force -geometry 166x125It is also possible to resize your images to speed up Web downloads. The following would scale the size of each image to 50 per cent of its original:

$ album -medium 50%

To publish the album, upload the entire contents of the directory to your Web site. Additionally, you can burn the album onto a CD.

Join the newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Alastair Cousins

PC World
Show Comments


James Cook University - Master of Data Science Online Course

Learn more >


Victorinox Werks Professional Executive 17 Laptop Case

Learn more >

Sansai 6-Outlet Power Board + 4-Port USB Charging Station

Learn more >



Back To Business Guide

Click for more ›

Brand Post

Most Popular Reviews

Latest Articles


PCW Evaluation Team

Louise Coady

Brother MFC-L9570CDW Multifunction Printer

The printer was convenient, produced clear and vibrant images and was very easy to use

Edwina Hargreaves

WD My Cloud Home

I would recommend this device for families and small businesses who want one safe place to store all their important digital content and a way to easily share it with friends, family, business partners, or customers.

Walid Mikhael

Brother QL-820NWB Professional Label Printer

It’s easy to set up, it’s compact and quiet when printing and to top if off, the print quality is excellent. This is hands down the best printer I’ve used for printing labels.

Ben Ramsden

Sharp PN-40TC1 Huddle Board

Brainstorming, innovation, problem solving, and negotiation have all become much more productive and valuable if people can easily collaborate in real time with minimal friction.

Sarah Ieroianni

Brother QL-820NWB Professional Label Printer

The print quality also does not disappoint, it’s clear, bold, doesn’t smudge and the text is perfectly sized.

Ratchada Dunn

Sharp PN-40TC1 Huddle Board

The Huddle Board’s built in program; Sharp Touch Viewing software allows us to easily manipulate and edit our documents (jpegs and PDFs) all at the same time on the dashboard.

Featured Content

Product Launch Showcase

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?