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!


Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Alastair Cousins

PC World
Show Comments

Brand Post

Shining a light on creativity

MSI has long pushed the boundaries of invention with its ever-evolving range of laptops but it has now pulled off a world first with the new MSI Creative 17.

Most Popular Reviews

Latest Articles


PCW Evaluation Team

Tom Pope

Dynabook Portégé X30L-G

Ultimately this laptop has achieved everything I would hope for in a laptop for work, while fitting that into a form factor and weight that is remarkable.

Tom Sellers


This smart laptop was enjoyable to use and great to work on – creating content was super simple.

Lolita Wang


It really doesn’t get more “gaming laptop” than this.

Jack Jeffries


As the Maserati or BMW of laptops, it would fit perfectly in the hands of a professional needing firepower under the hood, sophistication and class on the surface, and gaming prowess (sports mode if you will) in between.

Taylor Carr


The MSI PS63 is an amazing laptop and I would definitely consider buying one in the future.

Christopher Low

Brother RJ-4230B

This small mobile printer is exactly what I need for invoicing and other jobs such as sending fellow tradesman details or step-by-step instructions that I can easily print off from my phone or the Web.

Featured Content

Product Launch Showcase

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?