You can also select these from
your favourite kernel configuration program.
Note:
If you are using a modern Linux distribution you should not have to do the
above, USB will probably already be available in your Kernel.
Configuration
Files:
The only configuration file you are probably going to
need to edit at this poinf is
/etc/fstab
in order to ensure
that the usbdevfs is mounted at boot time, make sure that
/etc/fstab
contains this line:
none /proc/bus/usb
usbdevfs defaults 0 0
Installing the required Libraries:
You will need to have libusb installed on your computer, a development
RPM and a base RPM are needed. Get
libusb-0.1.4-1.i386.rpm and
libusb-devel-0.1.4-1.i386.rpm. If you need to install from source code
it can be found on
Sourceforge.
Connecting the Canon Powershot S40 to the computer:
Use the supplied USB cable from any free USB port. When you have
plugged the camera in type
dmesg
in an xterm, you should see
a message something like this:
USB new device connect
on bus1/1/3, assigned device number 7
USB device 7 (vend/prod 0x4a9/0x3056) is
not claimed by any active driver.
Your S40 is now connected to your computer and can be accessed, well
done. The hard part is coming up.
Software to download images and videos
Change: As of late Jan 2002, gphoto2 needs libexif, get this
from
sourceforge. You need
the libexif and libexif-gtk packages. Get the most recent ones, unpack them
and compile them before getting gphoto2.
To download images and videos the only program available at the moment
is
gphoto2. You may have heard of this
program, or of gphoto. gphoto2 is a re-implementation of gphoto without
a GUI. There is a catch though, S40 support is very new and only available
from the gphoto2 CVS tree, so you will have to download it, here's how:
- You should now have a directory called gphoto2
containing the source code.
Now you need to configure, build and install the source code.
- Run
./autogen.sh
from within
the gphoto directory.
- Then run
make
to build the code.
- Finally
su -c 'make install'
to install the code.
Downloading images and videos
The Powershot S40 is autodetected by gphoto2, to download images
from the camera just type: gphoto2 -P you will probably have to be root
to do this, in which case the command is su -c 'gphoto2 -P'.
Change: There is an application called gtkam included
with the gphoto2 cvs though, and I suggest you use this as it provided a
nice graphical interface. Go into the
frontends/gtk-old/
directory
in the gphoto2 directory and do a
./configure
followed by a
make
and a
make
install
, you should now have the gtkam applicaiton at your disposal.
Change: You can disregard the superceeded stuff at the end
of this chapter if you use usb-hotplugging. Read on if you are using
a recent 2.4.x series kernel with hotplugging enabled.....
- Get usb-hotplug from
sourceforge. Make sure it is the latest version.
- Extract, compile and install
the code.
- go to
/etc/hotplug/
and put in the following files
Ensure that usb.usermap contains this line:
usbcam 0x0003 0x04a9 0x3056 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
Put this file in
/etc/hotplug/usb/usbcam
#!/bin/bash
# $Id: gphoto2.txt,v 1.3 2001/10/19
14:13:38 hun Exp $
if [ "${ACTION}" = "add" ] &&
[ -f "${DEVICE}" ]
then
chgrp camera "${DEVICE}"
chmod a+rw "${DEVICE}"
fi
- Start hotplugging (
/etc/rc.d/init.d/hotplug
start
)
- When you connect your camera
users will have full read-write permissions. I've modified the script to
start gtkam whenever I plug in the camera, but that's another story.
- Run gtkam. You can select your
camera and you're away.
Superceeded
by usb-hotplugging!!!
The needing to be root thing is a real pain, so here is a workaround (security
fans, look away in horror now)
- Create a text file containing the following
lines called getpics:
#!/bin/bash
gphoto2 -P
chmod 777 *
- Make the script executable (
chmod a+x getpics
)
- Become root.
- Make the script suid root (i.e.
chmod a+s getpics.sh
)
- Make /usr/local/bin/gphoto2 suid root
(chmod a+s /usr/local/bin/gphoto2
)
- Run the script in the directory in
which you want your files to appear.
You can now
download pictures from your PowerShot S40 (hopefully, if not, re-read this
howto).
Viewing the pictures
You can use any image viewing program you want to view your pictures,
I would suggest
gqview for
viewing and the
Gimp for editing, i'm
sure that you can find these yourself. Look on Freshmeat.
Viewing the videos
The S40 uses a quicktime codec to display it's videos. Usually this
is Windows only, but there is a Linux program that works. It's called
Mplayer. Get the
source code to the latest release and install it. It includes windows-only
.dlls that enable you to view your movies.
Conclusion:
So, that's it. Hopefully you can now download pictures from your
S40 from Linux. I hope that this document has been of some use to you. If
you can think of any imprevements please email me dan@dangray.org