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 PC World 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

Most Popular Reviews

Latest Articles


PCW Evaluation Team

Matthew Stivala

HP OfficeJet 250 Mobile Printer

The HP OfficeJet 250 Mobile Printer is a great device that fits perfectly into my fast paced and mobile lifestyle. My first impression of the printer itself was how incredibly compact and sleek the device was.

Armand Abogado

HP OfficeJet 250 Mobile Printer

Wireless printing from my iPhone was also a handy feature, the whole experience was quick and seamless with no setup requirements - accessed through the default iOS printing menu options.

Azadeh Williams

HP OfficeJet Pro 8730

A smarter way to print for busy small business owners, combining speedy printing with scanning and copying, making it easier to produce high quality documents and images at a touch of a button.

Andrew Grant

HP OfficeJet Pro 8730

I've had a multifunction printer in the office going on 10 years now. It was a neat bit of kit back in the day -- print, copy, scan, fax -- when printing over WiFi felt a bit like magic. It’s seen better days though and an upgrade’s well overdue. This HP OfficeJet Pro 8730 looks like it ticks all the same boxes: print, copy, scan, and fax. (Really? Does anyone fax anything any more? I guess it's good to know the facility’s there, just in case.) Printing over WiFi is more-or- less standard these days.

Ed Dawson

HP OfficeJet Pro 8730

As a freelance writer who is always on the go, I like my technology to be both efficient and effective so I can do my job well. The HP OfficeJet Pro 8730 Inkjet Printer ticks all the boxes in terms of form factor, performance and user interface.

Michael Hargreaves

Windows 10 for Business / Dell XPS 13

I’d happily recommend this touchscreen laptop and Windows 10 as a great way to get serious work done at a desk or on the road.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?