Canon PowerShot A60 on Fedora Core 2

by Uche Ogbuji

I do have a lot of notes stored up on my experiences with Fedora Core 2, and I need to hurry up and get them posted, but I wanted to push out these notes on my experience reading pictures and movies from my Canon PowerShot A60 using the USB (1.1) connection to my Dell Inspiron 8600 laptop running Fedora Core 2 Linux.

First of all, the obligatory system specs:

$ uname -a
Linux borgia 2.6.6-1.435custom #1 Tue Jun 15 23:25:40 MDT 2004 i686 i686 i386 GNU/Linux

I'm not using a standard FC2 kernel because I ran into this bug and built my own kernel with the "ugly" patch Pekka Pietikäinen worked up.

Anyway, I plugged in my camera to my USB port. Using the dmesg command I found the device messages:

usb 1-1: new full speed USB device using address 5

It turned out that it's a good thing I glanced at this (like many Linux gearheads I glance at dmesg from time to time), because that number "5" turns out to be a key to getting things working.

I knew I'd used gphoto in the past, but I just opened up the GNOME desktop menu to see what I could find to use with the camera. I was pleased to find the unmistakable entry "Digital Camera Tool" and clicked this, launching a program called "gtkam".

I'd turned on the camera and set it to the preview mode. I know the camera has to be turned on, but I'm not sure what mode it has to be set to for data transfer (too lazy to RTFM). I guess the mode is not all that important because the camera seems to go into some special mode once a computer has started to talk to it, but I'm coming to that part.

I chose the "Camera -> Add Camera" menu item and clicked "Detect" in the resulting dialog box. It instantly changed the detected camera to the exact model, so I figured I was home free, but when I tried to click "OK", I got an "unable to initialize camera error". After a bit of fiddling ang googling I found this somewhat outdated page which provided the key clue: I didn't have permissions to access the USB device. I checked the file "/proc/bus/usb/devices" which provided somewhat cryptic information about the attached USB devices. I did at least glean that the Camera is on bus 1 (my guess is that it would be bus 1 in most cases), and the device message I mentioned indicated it's device 5. I was then able to allow myself access to the camera by executing (as root):

chmod a+w /proc/bus/usb/001/005

From this point gtkam worked like a champ, and the following image shows it in operation browsing the pictures on my camera's CompactFlash card.

gtkam in action reading files from the CF card in a Canon PowerShot A60

I was able to use the flexible gtkam "File -> Save Photos -> All" dialog to grab the images and AVIs. The only thing I missed was the option to, say, select the "DCIM" folder and just have it save the whole shebang to my hard drive in a mirror of the structure on the camera. As it is I had to select and save, in turn, each folder that actually held pictures: 100CANON, 102CANON, etc.

Once I transferred the files they were ready fodder for whatever Linux graphics and video tools I pointed at them. The video clips the camera records are AVIs and played flawlessly in mplayer and videolan client (you'll need to use yum or apt-get to add these to your FC2 installation).

One issue: I found that the camera shuts down after a pretty brief period of inactivity (probably a setting I could tweak on the camera), and if so gtkam gets flustered (mostly it gives an erro rmessage, but once it "unexpectedly quit"). When this happens I just turn the camera back on and check dmesg again. The hotplug logic in kernel 2.6 increments the device number each time, so after the first shut-down it comes back as device 6 and so on. I found I have to do the chmod each time in the corresponding /proc... pseudo-file. I expect there are probably tools to automate all this for the user, and if you know of any, please comment with links and other pointers. I was happy enough with the simple formula that worked for me, that I didn't do any more digging.

In general the exercise was quite painless, but I wanted to give others a few pointers around the minor potholes I encountered.

Side note: thanks to Matt Biddulph for recommending this great camera.

Do you have tips and experiences of your own to share with digital camera users on Linux?


2004-07-27 04:56:06
chmod -R a+w /proc/bus/usb/001/
Change the permission on the usb directory i.e.

chmod -R a+w /proc/bus/usb/001/


there might be some security issues ??, however the problem with the chmod
is solved (Debian).

2004-07-27 07:24:48
Re: chmod -R a+w /proc/bus/usb/001/
Thanks for the comment, but I wanted to be sure I was clear on what you're saying.

Do you mean that Debian users don't need to do the chmod step? If so, this is great, and I hope the Debian maintainers upstream the corresponding fix so that other distros can benefit as well. Also, is this true for Debian stable, unstable, testing, experimental...?

And do you mean that there are security issues with manually running the chmod, or rather with the fix that perhaps Debian has so that the chmod is not necessary?

Thanks for any further info.


2005-09-20 15:57:39
saving the whole shebang
Hi, just wanted to mention that there is now an option to save a whole directory structure together with pictures inside it from gtkam. For example to mirror the DCIM directory on your hard disk you would click the DCIM entry in the tree view with the right mouse button and choose "Save directory tree..", this way you don't have to repeat "Save all.." for 201canon, 202canon, etc.
This option is now availiable in the current CVS version of gtkam, probably will be included in the next release (so you'll have to wait until it reaches your favourite distribution).

Also wanted to mention that Gentoo users don't need to worry about the device permissions problem because Portage solves it for them. Besides this, this article probably applies to all distributions and most digital cameras.