Running Canon EOS 400D under Linux


As of October 26th 2006, gPhoto does not support the Canon EOS 400D (aka "Digital Rebel XTi" in the US). I am sure that proper support will be added soon, so if you read this in a month or so, better check for updates of gPhoto (also see the list of supported cameras).

Open issues

The below method gives you access to your files, but it is very slow. Copying a 1G card took me several hours using the kioslave (for gPhoto in Konqueror). Apparently the protocol is re-initialised for each file, which takes a very long time. The transmission of the files is reasonably quick, but the init phase is very long.

Buying one of those <10EUR CF-Readers for USB might be the preferrable solution to safe your cameras batteries during downloading.

Basic setup

The following worked for me on Kubuntu Dapper Drake, and might fail elsewhere. Try at your own risk. If in doubt, stick to the directions from your camera vendor and buy a Mac.

Normally, using a digicam in Linux amounts to opening some graphical user interface (e.g. the KDE control center camera settings or the gtkam frontend in Gnome) that autodetects your camera and allows you to make some settings. Consider trying this first.

If the normal setup fails, you need to do the following steps:

  • Open a shell and become root:
myuser@mybox:$ su
or (e.g. on Ubuntu or Knoppix)
myuser@mybox:$ sudo su
  • Add all users that should access the camera to the group plugdev:
root@mybox:$ addgroup myuser plugdev
  • Open the file /etc/udev/rules.d/45-libgphoto2.rules for editing (use your favourite editor):
root@mybox:$ joe /etc/udev/rules.d/45-libgphoto2.rules
If this file does not exist, check whether libgphoto is properly installed and find out where the file is located on your machine, e.g. by running locate libgphoto2.rules if set up properly.
  • The file contains lines for each known camera. Yours is not listed. Add the following new lines:
# Canon EOS 400D
SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="3110", GROUP="plugdev", MODE="0660"
Put those lines next to the other lines of similar shape and content.
  • Save the file.
  • Now you need to reload the modified files and group permissions. The foolproof way is to restart your machine. Else you can restart udev from init.d and logout and back in to your graphical desktop environment, if using.
  • Now attach your EOS 400D via USB, switch it on, and try to access it normally with your system:
    • On KDE, open the control center and look for the camera settings. Your camera should be listed. The try camera:/ in Konqueror to see its contents.
    • On Gnome, there should be similar ways.
    • Otherwise, or if the above does not work, open a shell and run gphoto:
myuser@mybox:$  gphoto2 --auto-detect
It should come up with a generic "USB PTP Class Camera". You can then use gphoto on the command line (try "gphoto2 -L") or check whether your graphical tools now see the camera.


If it does not work, check the following:

  • gphoto2 is installed and up-to-date
  • your camera is attached (run "dmesg" to see whether a USB device was found)
  • your camera is powered (recall that it switches off after 30secs or so -- press a button)
  • you are in the plugdev group (run "groups")

Before changing udev and the groups, you can also try as root:

root@mymachine:$  lsusb

This should list your camera.

root@mymachine:$  gphoto2 --auto-detect

This should detect it as described above. Root, however, should normally not be the one to download pictures from you camera!

This article is based on a related message by Phil Endecott.