This chapter contains scanning applications which allow you to convert printed documents into formatted documents readable by other applications.


Introduction to SANE

SANE is short for Scanner Access Now Easy. Scanner access, however, is far from easy, since every vendor has their own protocols. The only known protocol that should bring some unity into this chaos is the TWAIN interface, but this is too imprecise to allow a stable scanning framework. Therefore, SANE comes with its own protocol, and the vendor drivers can't be used.

SANE is split into back ends and front ends. The back ends are drivers for the supported scanners and cameras. The front ends are user interfaces to access the backends.

Back Ends Package Information

Front Ends Package Information

SANE Dependencies

Optional (Back Ends)

libjpeg-6b, libusb-0.1.12, libieee1284, libgphoto2, and teTeX-3.0

Optional (Front Ends)

X Window System, GTK+-2.8.20, and GIMP-2.2.12

User Notes:

Kernel Configuration

To access your scanner, you will probably need the related kernel drivers and/or additional support packages. A SCSI scanner will need SCSI drivers, a parallel port scanner needs parallel port support (you should use enhanced EPP modes) and perhaps libieee1284 and a USB scanner will need the libusb-0.1.12 package. Ensure you have the necessary drivers properly configured to access the devices.

Installation of SANE

Installation of SANE Back Ends

Install SANE-backends by running the following commands:

./configure --prefix=/usr --sysconfdir=/etc &&

This package does not come with a test suite.

Now, as the root user:

make install

Installation of SANE Front Ends

The SANE-frontends package includes the graphical frontends xscanimage and xcam, and a command-line frontend scanadf. You don't need this package if you intend to use one of the more advanced graphical frontends like XSane-0.97. For a list of frontend packages, see

To install SANE-frontends, use the following commands:

./configure --prefix=/usr &&

This package does not come with a test suite.

Now, as the root user:

make install &&
install -v -m644 doc/sane.png xscanimage-icon-48x48-2.png \

If GIMP was linked into the build and you wish GIMP to use xscanimage as a scanning plugin, issue the following command as the root user:

ln -v -s ../../../../bin/xscanimage /usr/lib/gimp/2.0/plug-ins

Command Explanations

--sysconfdir=/etc: This switch installs the configuration files in /etc/sane.d instead of /usr/etc/sane.d.

Configuring SANE

Config Files


Configuration Information

Backend Configuration

The backend configuration files are located in /etc/sane.d. Information for configuring the various backends can be found by using the man(5) page for the desired backend. Run man sane-<backend>, substituting the desired backend.

General Information

For general information about configuring and using SANE, see man sane. Linux-2.6.x brings some special issues into the picture. See for information about using SANE with the Linux-2.6.x kernel. For information about USB scanning devices, run man sane-usb. For information about SCSI devices, run man sane-scsi.

Configuration and setup of the 'saned' daemon

The saned daemon is not meant to be used for untrusted clients. You should provide TCP Wrapper-7.6 and/or Firewalling protection to ensure only trusted clients access the daemon. Due to the complex security requirements to ensure only trusted clients access the daemon, BLFS does not provide instructions to configure the saned daemon. If you desire to make the daemon available, ensure you provide adequate security, configure your [x]inetd.conf file and send a SIGHUP to the [x]inetd daemon. Some good information for setting up and securing the saned daemon can be found at


Back Ends:

Installed Programs: gamma4scanimage, sane-config, saned, sane-find-scanner, and scanimage
Installed Libraries: and numerous scanner backend modules
Installed Directories: /etc/sane.d, /usr/include/sane, /usr/lib/sane, /usr/share/sane, and /usr/share/doc/sane-1.0.17

Front Ends:

Installed Programs: scanadf, xcam, and xscanimage
Installed Library: GIMP plugin embedded in xscanimage
Installed Directories: None

Short Descriptions


creates a gamma table in the format expected by scanimage.


is a tool used to determine the compiler and linker flags that should be used to compile and link SANE.


is the SANE daemon that allows remote clients to access image acquisition devices available on the local host.


is a command-line tool to find SCSI and USB scanners and determine their device files. Its primary purpose is to make sure that scanners can be detected by SANE backends.


is a command-line interface to control image acquisition devices which are equipped with an automatic document feeder (ADF).


is a command line interface for scanning from image acquisition devices such as flatbed scanners or cameras. It is also used to list the available backend devices.


is a graphical camera front end for SANE.


is a graphical user interface for scanning.

is the application programming interface that is used to communicate between frontends and backends.


modules are backend scanning library plugins used to interface with scanning devices. See for a list of supported backends.

Last updated on 2007-01-28 11:43:31 -0600