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 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?