USB Scanner

Introduction
This article tries to help you to install your USB scanner using SANE. SANE stands for "Scanner Access Now Easy" and provides a standardized access to any raster-image scanner hardware. SANE supports a lot of devices. Get a list of them at sane-project.org. This guide assumes that your scanner is supporter by SANE.

Kernel Options
Make sure you have USB support in your kernel. The kernel option you should select will be either OHCI HCD or UHCI HCD, depending on your motherboard's chipset. Use the lspci command to find out which one is right for you:

If you want more informations on USB, please read the Gentoo Linux USB Guide.

Collecting Information
After rebooting your computer (if you asked for scanner support to be built into the kernel) or loading the appropriate modules (if you asked for it to be built as modules), connect your scanner to the USB port, turn it on, and issue the following commands:

The output should be similar to that shown below:

lsusb

Next to the name of your scanner (in this case, Hewlett-Packard PSC 1400), you should also see two 4-digit codes: the Vendor (in this case, 03f0) and the ProdID (in this case, 4d11). These values may differ from the ones shown depending on your scanner's model. Save them as they may be needed in the configuration process later on.

Back end
The back end package is called. If you have a USB printer, you must enable the USE flag.

If you have an HP all-in-one that is supported by (check the list of supported devices), you should emerge that package with the  USE flag enabled.

Now you can check if sane can find your scanner with If your output looks like this sane-find-scanner -q you are on your way to getting your scanner running.

TODO: What to do if it is not showing up

To allow non-root users the access to the scanner, you have to write a udev rule. The config file should be created by the package at. You will only need the lsusb output from above to write this line.

70-libsane.rules

This rule allows anyone in the "scanner" group to use the scanner. You can add somebody to the scanner group with Unplug and plug back in your scanner, and permissions should be correctly loaded. Before adding something to this file please check if your printer is already listed. You need to change the idVendor and idProduct values to your own model and product number.

If you have any problems with the connection to or permission of the scanner, it is likely that something is wrong with your udev rule.

Front end
A few different front ends are available.

The package includes scanimage, a fairly flexible command-line front end.

If you want a GUI, you can emerge. If you enable the gimp USE flag you can open the scan dialog from GIMP.

For Epson scanners,, another GUI front end, is also available.