Penguin
Blame: DigitalCameraSetup
EditPageHistoryDiffInfoLikePages
Annotated edit history of DigitalCameraSetup version 17, including all changes. View license author blame.
Rev Author # Line
11 DanielLawson 1 This page attempts to describe how to get your DigitalCamera working under Linux.
2
13 JohnMcPherson 3 !!!Software
4
5 !!Front-end applications
11 DanielLawson 6 Linux Frontend software for transfering pictures off cameras:
7 * [gphoto2|http://gphoto.sourceforge.net/] (the "main" software, it has all the low-level libraries and a CLI)
15 JohnMcPherson 8 * __gtkam__ ([GNOME] or [GTK]-only front-end to the gphoto2 libraries)
11 DanielLawson 9 * [gthumb|http://gthumb.sourceforge.net/] - a GNOME thumbnail previewer that has the ability to import photos (using the gphoto2 libraries)
10 * kamera ([KDE] front-end to gphoto2, also allows you to use a camera:// URI in konqueror)
15 JohnMcPherson 11 * [GIMP] 1.2 and later - if gphoto2 is installed (or the more specifically the gphoto2 gimp-plugin), you can use File -> Acquire
12
11 DanielLawson 13
14 These programs have [Debian] packages of the same name - I would guess [RPM]-based distros do too.
15
15 JohnMcPherson 16
17 You can also "mount" some cameras onto your filesystem, so that the contents look like a normal directory. See the "mass-storage" notes below.
13 JohnMcPherson 18
19 !!Back-end 'automatic mounting' setup
20 * For [USB] devices, you can use HotPlug to automatically run something when a certain USB device is connected. This could either run one of the above photo-transfering programs, or it could mount the flash card onto your filesystem. If your distribution doesn't do this automatically, look at our HotPlugNotes page to see how to set this up manually.
15 JohnMcPherson 21 *
22 [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.
13 JohnMcPherson 23
11 DanielLawson 24
25 ----
13 JohnMcPherson 26 !!!Notes/Trouble-shooting
11 DanielLawson 27 * Almost all "recent" cameras use [USB], so make sure you have the correct USB support in your kernel (this seems fairly likely).
28 * See HotPlug for information on setting up using [USB] devices with linux.
15 JohnMcPherson 29 * After the camera is setup as a USB device, there are two main ways the picture contents can be read: __USB Mass Storage__, or __PTP__. (gphoto2 also supports some other camera-specific/non-standard protocols.)
17 JohnMcPherson 30 **USB Mass Storage may not be compatible if your system has Hotplug USB support setup properly and the Camera is not emulated as a SCSI sevice. See the Mass-Storage Device notes below for details how compatible cameras function under this protocol.
31 ** Also, many recent cameras (such as the Kodak DX series) use the Picture Transfer Protocol (PTP), which [gphoto2|http://www.gphoto.org/] supports. A list of comaptible devices can be found at [http://www.gphoto.org/proj/libgphoto2/support.php|http://www.gphoto.org/proj/libgphoto2/support.php] as of August 8, 2004.
11 DanielLawson 32 **Some other cameras might require kernel support for their own protocols, if neither of the above two methods work.
33
34
35 The Kodak DX3900 and DX4900, unlike the other DX cameras, don't allow uploading files from your computer to the camera - you get a write error.
17 JohnMcPherson 36 (see [kodak faq item|http://faqs.kodak.com/101_en/FAQ_27_7376.shtm].)
11 DanielLawson 37 ----
38 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.
39
40 ----
41 !!GPhoto2
42
15 JohnMcPherson 43 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).
44
45 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).
11 DanielLawson 46
47 You need to load the USB modules (not sure which ones, I have them built in), assuming you have a USB camera, of course.
48
49 Under Debian, you can
50 apt-get install gphoto2
51
52 Note that you will either need to run these commands as root, or (preferably) set
53 your system up so that non-root users have read (and write) access to the correct
54 devices. Debian users should read /usr/share/doc/libgphoto2-2/README.Debian for
55 information on how to use gphoto2 as a non-root user (which is contained within the
56 libgphoto2-2 package). (There should be a similar file in the gphoto2 or libgphoto2
57 package on rpm based systems). The HotPlug page also briefly describes how to set up
58 scripts to set the permissions on the USB port.
59
60 After gphoto2 is installed, run:
61 gphoto2 --port "usb:" --camera "Kodak CX4230" --get-all-files
62
63 This will detect the camera plugged into the USB port.
64
65 And with any luck you will have your photos downloaded to $PWD, otherwise you can use the "--get-all-files" argument to gphoto2.
66
67 (Note: It is not strictly necessary to specify the port and camera model, since gphoto2 will scan them, and will also store these settings in the $HOME/.gphoto/settings file. Just doing
68 gphoto2 --get-all-files
69 should be enough if everything goes well. "-P" is a short-cut option for "--get-all-files")
70
71 After you're done, you can erase the pictures from the camera with
72
73 gphoto2 --port "usb:" --camera "Kodak CX4230" --delete-all-files
74
75 ("-D" is a shortened option for "--delete-all-files". Again, the --port and --camera aren't really necessary if the
76 gphoto libraries successfully automatically detect the camera type - it will use stored settings.)
77
78 If you don't want to use the command-line, you can use one of the graphical front-ends mentioned earlier up the page.
79
80
81 ----
82 !!Mass-Storage device
83
14 JohnMcPherson 84 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.)
11 DanielLawson 85
15 JohnMcPherson 86 The following makes and models of cameras are known to have USB mass-storage support:
87 * Casio (QV 2x00/3x00/4000/8000)
88 * ~FinePix (19400,2400,4700 Zoom, 1300, 2800 Zoom, 4500)
89 * HP (~PhotoSmart 315, 618, 912)
90 * Leica (Digilux 4.3)
91 * Kyocera (Finecam s3)
92 * Konica (KD300, Revio C2*)
93 * Minolta (Dimage 7)
16 JohnMcPherson 94 * Nikon (Coolpix 995, Coolpix 2000*, Coolpix 2500, D70)
15 JohnMcPherson 95 * Olympus (C1, C-100, C-200Z, C-700, C-860L, C-2040, C-3040Z, D-510, E-10)
96 * Samsung (Digimax V4)
97 * Sony (DSC-F505(V), DSC P5, DSC-F707)
11 DanielLawson 98
16 JohnMcPherson 99 ~* 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.
100
15 JohnMcPherson 101 (Please add any other mass-storage cameras to this page. This list originally based on information at http://aamot.org/ole/photography.html.)
102
103 Under a stock RedHat just plug it in and check what it got detected as;
104 <verbatim>
11 DanielLawson 105 #dmesg
106 ~~~
107 USB Mass Storage device found at 4
108 SCSI device sda: 14528 512-byte hdwr sectors (7 MB)
109 sda: Write Protect is off
110 sda: sda1
111
112 #cdrecord --scanbus
113 ~~~
114 0,0,0 0) 'CONCORD ' 'DIGITAL CAMERA ' '1.00' Removable Disk
115 ~~~
15 JohnMcPherson 116 </verbatim>
11 DanielLawson 117 then mount it (make sure the /mnt/usbfs directory or whereever you decide to mount it exists):
15 JohnMcPherson 118 <verbatim>
11 DanielLawson 119 #mount /dev/sda1 /mnt/usbfs
15 JohnMcPherson 120 </verbatim>
11 DanielLawson 121 (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).
122
123 Your piccies will appear somewhere under this directory and you can copy, move, delete them like any other filesystem.
124
125 /mnt/usbfs/dcim/100duopl:
126 -rwxr-xr-x 1 root root 189064 Jan 2 2000 img00001.jpg
127
128 The same steps should work for any other Linux distro, although you might need to manually load modules for USB and USB filesystem support.
129
130 The procedure was almost identical under FreeBSD, but I've forgotten exactly what I did. I'll wiki that up some other time.
131
132 ----
133
134 Here is how I got my brand new __Samsung Digimax V4__ digital camera working in Linux.
135
136 By 'working' I mean, the files on the Secure Digital card are readable while the camera is connected to my PC via USB.
137
138 First of all, I am using Linux 2.4.21 on Gentoo (2003-07-18), with an Asus A7V8X motherboard (hence KT400 chipset).
139
140 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.
141
142 After connecting my camera to the USBus, a quick 'dmesg' showed that the camera had been detected. I loaded the usb-storage driver and the SCSI disk driver. I confirmed that it had been picked up as an emulated SCSI device by:
15 JohnMcPherson 143 <verbatim>
11 DanielLawson 144 $ cat /proc/scsi/usb-storage-0/1
145 Host scsi1: usb-storage
146 Vendor: SAMSUNG
147 Product: DIGIMAX V4
148 Serial Number: None
149 Protocol: 8070i
150 Transport: Bulk
151 GUID: 083910090000000000000000
152 Attached: Yes
15 JohnMcPherson 153 </verbatim>
11 DanielLawson 154 Also, /dev/sda1 appeared.
155
156 To mount the filesystem on the camera's SD card, I simply:
15 JohnMcPherson 157 <verbatim>
11 DanielLawson 158 $ mount -t msdos /dev/sda1 /mnt/usbfs
15 JohnMcPherson 159 </verbatim>
11 DanielLawson 160 And voila!
161
162 I think that was all. The hardest part was working out what drivers I needed.
163 ----
164
165 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.
12 AristotlePagaltzis 166
167 ----
168
169 See also: [some good info about digital cameras | http://www.teaser.fr/~hfiguiere/linux/digicam.html]
11 DanielLawson 170
171 ----
172
173 Part of CategoryHardware

PHP Warning

lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 10 times)