Linux: Getting your digital pix using Linux

It may lack an all-in-one solution like Apple's iPhoto, but there are tools that make using a digital camera with Linux easy.

In this month's column, I'll be showing you some useful methods for accessing your digital camera under Linux, as well as JAlbum, a great tool for building Web-based photo albums.

Downloading images from your camera

There are two ways to access and download images from a digital camera under Linux. Determining which method is best for your camera will depend on the model of camera that you have. Some cameras work with the first method, others with the second. The best way to work out which method suits your hardware is simply to indulge in a little trial and error. They're both free, after all.


gPhoto > is a "one size fits all" solution to accessing photos stored on your digital camera, and includes native driver support for hundreds of cameras. A complete list is available at, and you'll find a copy of gPhoto on this month's cover disc. If your camera isn't listed in gPhoto, the chances are that it can be accessed using the USB Mass Storage method covered in the next section.

gPhoto includes a simple GUI interface, named gtkam. To access your camera, connect your digital camera to the USB port on your computer and switch the camera on. Once the camera is on, start gtkam by typing at a prompt:

$ gtkam

If supported, the camera will be auto-detected by gtkam and thumbnails of the images stored on it will be displayed. You can now copy these images to your computer. When you're done using gPhoto, remember to turn your camera off before disconnecting it from your computer.

USB Mass Storage

Most other cameras can be accessed as a USB Mass Storage device. This means that the camera is seen as a portable hard disk by the computer and no special drivers are needed, much like a USB key. Memory card readers - like the Laser 7-in-1 memory card reader that I have used in this article - can also be accessed with this method. You can pick one of these handy devices up for about $30, which is a worthwhile investment if you're often transferring photos from your camera.

If you're using a product like this under Windows, the reader shows up as seven individual drives! This is both confusing and irritating, as you'll often find yourself double-clicking on random drive letters to find the contents of the memory card you just inserted. Fortunately, Linux is much smarter and only adds a drive when it's got a memory card in it. After attaching your card reader or camera to your computer, type the following command in a shell.

$ dmesg

If the camera or card reader is supported by Linux, you should see some messages similar to the following:

scsi0: SCSI emulation for USB Mass Storage devices
Vendor: Generic Model: STORAGE DEVICE Rev: 0128
Type: Direct-Access ANSI SCSI revision: 02
SCSI device sda: 501760 512-byte hdwr sectors (257 MB)
sda: sda1

From these messages, you can see that the camera has been detected and a USB Mass Storage device driver has been loaded. The most important part of this message is the device name allocated to the camera, in this case "sda1". Using this information, I can now mount the camera like any other hard disk using the following commands as root:

$ mount /dev/sda1 /mnt/camera
$ ls /mnt/camera
dcim misc nikon001.dsc

Make sure you double check that the directory /mnt/camera exists. You can create this directory by typing as root:

$ mkdir /mnt/camera

You can now copy images from the camera using standard Linux commands or the file manager for your desktop. Once you are done with the camera, remember to unmount it before turning it off and disconnecting it. Use the following command:

$ umount /mnt/camera

Building a photo album

I've included the photo album tool JAlbum on this month's cover disc. JAlbum runs on practically every operating system under the sun, including Windows, MacOS X and of course, Linux. To install it, you'll need a working installation of Java on your computer. Most distributions do not include Java, so I have included a copy on this month's cover disc, too. To install Java, type the following command in a shell while logged in as root. I like to install Java under /usr/local/ but you may prefer another location.

$ sh ./jre-1_5_0-linux-i586.bin

Once Java is installed, you can install JAlbum by simply typing the following two commands in a shell:

$ export PATH=$PATH:/usr/local/jre_1.5.0/bin
$ ./JAlbum.bin

When prompted, change the install location to /usr/local/jalbum and complete the installation.

Once installed, you can start JAlbum by typing in a shell:

$ /usr/local/jalbum/JAlbum

Using JAlbum is quite straight­forward. First, identify the location of the images you wish to make an album of and enter this into the Image Directory box. Second, select a location to output the gallery to and enter this into the Output Directory box. JAlbum includes a number of other options that you can adjust and large selection of themes for your photo album. Once the settings are to your liking, click Make Album and the gallery will be generated. You can now view the gallery by pointing a Web browser to the directory you entered as the output directory.

Once you've designed your photo album, you can upload it to your Web site via FTP directly from JAlbum. Click on the Publish tab and enter the details of your Web host. Check with your ISP if you have Web space available - most ISPs offer a small amount to all customers. There is a Test Connection option available to test these settings before publishing your album.

Using your photos

XScreensaver is the standard Linux screensaver application, and is supported in both KDE and GNOME. Included with XScreensaver are many screensavers that manipulate images. You can set XScreensaver to work with your photo collection by starting the Screensaver control panel on your desktop and selecting the Advanced tab. From this menu set XScreensaver to Choose Random Image rather than the default setting of Grab Desktop Images. Now when you use a screensaver such as Distort, a random image will be loaded from your photo collection and manipulated by XScreensaver.

You can also use your digital photos as a desktop background, or for icons for your favourite programs. To set a desktop background in GNOME, right click on the background and select the Change Desktop Background menu option. From the window that appears, select Add Wallpaper and load up your digital camera photos. It is possible to load multiple photos at once by holding down the key and clicking on each file name. To use a photo as an icon, right-click on an icon and select Properties. Click the Select Custom Icon button and Browse to the location of the photo you wish to use.

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

Cool Tech

Toys for Boys

Family Friendly

Stocking Stuffer

SmartLens - Clip on Phone Camera Lens Set of 3

Learn more >

Christmas Gift Guide

Click for more ›

Brand Post

Most Popular Reviews

Latest Articles


PCW Evaluation Team

Aysha Strobbe

Microsoft Office 365/HP Spectre x360

Microsoft Office continues to make a student’s life that little bit easier by offering reliable, easy to use, time-saving functionality, while continuing to develop new features that further enhance what is already a formidable collection of applications

Michael Hargreaves

Microsoft Office 365/Dell XPS 15 2-in-1

I’d recommend a Dell XPS 15 2-in-1 and the new Windows 10 to anyone who needs to get serious work done (before you kick back on your couch with your favourite Netflix show.)

Maryellen Rose George

Brother PT-P750W

It’s useful for office tasks as well as pragmatic labelling of equipment and storage – just don’t get too excited and label everything in sight!

Cathy Giles

Brother MFC-L8900CDW

The Brother MFC-L8900CDW is an absolute stand out. I struggle to fault it.

Luke Hill


I need power and lots of it. As a Front End Web developer anything less just won’t cut it which is why the MSI GT75 is an outstanding laptop for me. It’s a sleek and futuristic looking, high quality, beast that has a touch of sci-fi flare about it.

Emily Tyson

MSI GE63 Raider

If you’re looking to invest in your next work horse laptop for work or home use, you can’t go wrong with the MSI GE63.

Featured Content

Product Launch Showcase

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?