There are several ways to extract digital photos from a camera. Many cameras use Compact Flash (CF) media, and Linux supports many CF media readers, treating them much like hard disks. Thus, you can move the CF card from a camera to a CF reader and use the reader to extract photos from the CF media. The cameras invariably use the FAT filesystem, so you should be able to mount the camera's media as if it were a FAT disk.
A few cameras are supported by tools that are tailored to specific digital cameras or chipsets—for instance, cameras built on a Fujitsu chipset are supported by code at http://photopc.sourceforge.net. You may need to search for packages for your specific camera if you can't get it to work with one of the major digital camera programs. A few digital cameras are supported by the Scanner Access Now Easy (SANE) package, which was described in Chapter 3, "Using External Peripherals."
The main Linux digital camera package is gPhoto. There are actually two variants of gPhoto: the original package (version 0.4.3) and a newer version, gPhoto2. The original gPhoto is a monolithic X-based program. The newer gPhoto2 breaks support down into multiple components—libgphoto2 provides the underlying camera drivers and data transfer routines, gphoto2 provides a command-line interface, and gtkam is an X-based interface program.
Both gPhoto and gPhoto2 support cameras that interface via the RS-232 serial port or the Universal Serial Bus (USB) port. To use the original gPhoto with USB cameras, you need support for your USB camera in the Linux kernel. Most Linux distributions ship with a number of camera drivers compiled as modules, but you may need to check this detail. By contrast, gPhoto2 requires that the kernel driver for your USB camera not be loaded; instead, gPhoto2 uses the USB device filesystem to directly access the USB camera. Using either package with an RS-232 serial port is comparatively straightforward—you need just standard RS-232 serial port drivers.
In all cases, you need to ensure that the user who accesses the digital camera has appropriate permissions on the interface. For RS-232 serial cameras, these are usually /dev/ttyS?, where ? is a number—typically 0 or 1. USB cameras are usually accessible as files under/dev/usb (for example, /dev/usb/dc2xx0 for a Kodak DC200-series camera). Many distributions ship without the appropriate device files defined for digital cameras, so you may need to create them using mknod, as in mknod /dev/usb/dc2xx0 c 180 80. Consult your driver's documentation (usually in /usr/src/linux/Documentation/usb) to learn what major and minor numbers (180 and 80 in the preceding example) to use. When using gPhoto2 with a USB camera, you need to enable USB access using the USB device filesystem. Unfortunately, this is a tedious process. It's described at
The gPhoto developers have officially abandoned the original gPhoto package in favor of gPhoto2; however, not all of the original gPhoto drivers are available in gPhoto2, as of version 2.1.1, and the gtkam program is still on the simple side. Configuring gPhoto2 to use a USB camera is an extremely tedious proposition, and it doesn't always work smoothly. For these reasons, I describe the use of the original gPhoto in the following pages. Eventually, gPhoto2 and gtkam will probably become the predominant digital photo package for Linux, though.
If you're in the market for a digital camera, you should take care to buy a model that's supported by gPhoto, gPhoto2, or some other program. A list of cameras supported by gPhoto2 is available at http://gphoto.sourceforge.net/proi/libgphoto2/support.php. The list for the original gPhoto is similar but not identical; a partial list appears in the README file distributed with gPhoto. Searching on Google Groups
(http://groups.google.com) may turn up information on supported models, too. Configuring gPhoto
Before launching gPhoto, you should connect your camera to your computer and turn on the camera. In the case of USB cameras, be sure you've got an appropriate device file entry for the camera. Mandrake with its device filesystem should create an entry in /dev/usb automatically; with other distributions, you may need to create one. When you first launch gPhoto, it will display a dialog box informing you of the fact that it couldn't find a configuration and that you must tell the program what camera you're using. You do this by selecting the Configure O Select Port-Camera Model menu item, which brings up the Select Model/Port dialog box. Select your camera model from the drop-down list on the left of the dialog box and select the port used by your camera from the options on the right of the dialog box. If your camera uses a USB interface, you must type the device filename in the Other field. When you're done, click Save. If you see a dialog box advising you to check the device permissions, then the device file you specified might not exist or it might not have permissions that enable you to read from and write to it. You should correct this matter before proceeding further.
Some cameras provide additional options, which you can set from the Configure O Configure Camera menu. These options may include functions such as the RS-232 serial port speed or the ability to set the camera's clock from your computer's clock. Other cameras provide no such options, so selecting this menu item displays a dialog box informing you of this fact.
Was this article helpful?