This page attempts to describe how to get your DigitalCamera working under Linux.
You can also "mount" some cameras onto your filesystem, so that the contents look like a normal directory. See the "mass-storage" notes below.
* GNOME (2.6 and later) have gnome-volume-manager, which will automatically launch a program (defaults to gthumb) when a camera is attached to the computer. On Debian Sarge or Ubuntu, installed the 'gnome-volume-manager' package - note that the script only allows people in the 'camera' group to use the connected camera, so make sure your user is in this group.
There are two main ways to read (and write) files from (and to) a digital camera: using gphoto2, or accessing the raw filesystem as a mass-storage device.
The gphoto2 libraries can access many different cameras, via different connection methods (such as via a USB port, or a serial port, or a parallel port).
There are several programs that are front-ends to this library - these are listed above. These instructions are for the gphoto2 command line application, and these are pretty generic instructions, using a Kodak CX4230 as an example).
You need to load the USB modules (not sure which ones, I have them built in), assuming you have a USB camera, of course.
Note that you will either need to run these commands as root, or (preferably) set your system up so that non-root users have read (and write) access to the correct devices. Debian users should read /usr/share/doc/libgphoto2-2/README.Debian for information on how to use gphoto2 as a non-root user (which is contained within the libgphoto2-2 package). (There should be a similar file in the gphoto2 or libgphoto2 package on rpm based systems). The HotPlug page also briefly describes how to set up scripts to set the permissions on the USB port.
This will detect the camera plugged into the USB port.
And with any luck you will have your photos downloaded to $PWD, otherwise you can use the "--get-all-files" argument to gphoto2.
should be enough if everything goes well. "-P" is a short-cut option for "--get-all-files")
After you're done, you can erase the pictures from the camera with
("-D" is a shortened option for "--delete-all-files". Again, the --port and --camera aren't really necessary if the gphoto libraries successfully automatically detect the camera type - it will use stored settings.)
If you don't want to use the command-line, you can use one of the graphical front-ends mentioned earlier up the page.
If you have a camera not supported by gphoto, you can probably still mount it as a USB drive. (The USB page has notes on setting up Mass Storage support.)
* Note - requires manually adjusting some settings on the camera first. The Nikon can use either PTP mode (use gphoto2/gthumb above) or USB Mass storage: go into the "Setup" menu, then "USB", then choose either PTP or Mass Storage.
(Please add any other mass-storage cameras to this page. This list originally based on information at http://aamot.org/ole/photography.html.)
#dmesg ~~~ USB Mass Storage device found at 4 SCSI device sda: 14528 512-byte hdwr sectors (7 MB) sda: Write Protect is off sda: sda1 #cdrecord --scanbus ~~~ 0,0,0 0) 'CONCORD ' 'DIGITAL CAMERA ' '1.00' Removable Disk ~~~
#mount /dev/sda1 /mnt/usbfs
(A good place to mount the device would be the /media/camera directory, although you will need to create the directory if it isn't already there).
Your piccies will appear somewhere under this directory and you can copy, move, delete them like any other filesystem.
The same steps should work for any other Linux distro, although you might need to manually load modules for USB and USB filesystem support.
The procedure was almost identical under FreeBSD, but I've forgotten exactly what I did. I'll wiki that up some other time.
Here is how I got my brand new Samsung Digimax V4 digital camera working in Linux.
By 'working' I mean, the files on the Secure Digital card are readable while the camera is connected to my PC via USB.
First of all, I am using Linux 2.4.21 on Gentoo (2003-07-18), with an Asus A7V8X motherboard (hence KT400 chipset).
I have a CD burner so I already have the SCSI emulation compiled into my kernel (or as modules). The only extra SCSI module I needed is the SCSI Disk driver (sd_mod.o). I also had Mass Storage support (usb-storage.o) and the USB virtual filesystem support.
$ cat /proc/scsi/usb-storage-0/1 Host scsi1: usb-storage Vendor: SAMSUNG Product: DIGIMAX V4 Serial Number: None Protocol: 8070i Transport: Bulk GUID: 083910090000000000000000 Attached: Yes
Also, /dev/sda1 appeared.
$ mount -t msdos /dev/sda1 /mnt/usbfs
Under Gentoo with my Sony 5MP camera, I did all of the above and also added a /etc/fstab entry to use Supermount to automatically mount /dev/sda1 to /mnt/camera this works really well as now I can just plug and unplug the camera as I please and it automatically mounts and unmounts it. It also even shows a purty little icon on your Gnome desktop.
See also: some good info about digital cameras