Scanning with SANE and Other Tools

Here's how to get started using a scanner from Linux, and a comparison of the features in available scanning software.
SANE Configuration

Now that you have picked the appropriate driver, it's time to configure the back end. If you installed SANE using RPMs or using the default configuration when built from source, SANE's configuration files are located under /etc/sane.d. The main configuration file is called dll.conf. This file tells SANE which drivers to use. By default, many drivers are enabled. If you have only the one, you can limit this to the driver for your specific scanner. In our example, we've uncommented only the Epson driver, because we're using the Epson KOWA back end instead of the Plustek driver.

Not all back ends support all types of scanners. No matter what type of connection your scanner uses, each back-end configuration file needs to know the name of the device file your scanner will use. Remember, we found the device filename using the sane-find-scanner tool. Unfortunately, the format used to define this in the configuration file varies from back end to back end.

The Plustek back end (the default back end for SANE support of the Epson Perfection 1260) includes distinct sections for the USB and parallel port types of scanners. To specify the device file in this configuration file, use the device keyword followed by the name of the device file, as in this example:

device /dev/usb/scanner0

This entry must go in the appropriate section of the Plustek driver configuration file. However, in the Epson configuration file used by the Epson KOWA back-end driver for the Epson Perfection 1260, the device file is specified using the USB keyword followed by the device filename, as in this example:

usb /dev/usb/scanner0
Both the Epson and Plustek configuration files provide comments to help in their configuration, and all back ends have their own man pages to provide further configuration assistance. Though many configuration options are provided, the only option really required for all of them is the device file.

To test that your SANE configuration is working, try the following command:

scanimage -T

If your test fails, you may want to verify once again that the proper USB modules have been installed, that the device can be found by sane-find-scanner and that you have the correct device filename in your SANE back-end configuration file. The scanimage program's help option also can provide quite a bit of additional information about your scanner's capabilities:

scanimage --help

Graphical Front Ends

The hardware is configured and ready to run. What you need now is an easy-to-use, front-end graphical interface that lets you preview your scans, select regions to scan from the preview and, perhaps, make color, quality and resolution adjustments. You also need a way to get the scan into The GIMP for further processing.

There are actually three freely available front ends for use with SANE, plus a shareware tool that exists outside of SANE. Let's take a brief look at each before comparing features and quality issues.

XSane

This project has grown up with the SANE Project, side by side. The user interface is based on GTK+, and it includes a GIMP plugin to allow scanning directly from the File®Acquire menu in The GIMP.

Figure 1. The XSane Front End Managing the Epson Perfection 1260

When run as a GIMP plugin, the Viewer window is not used—the scanned image is transferred directly to The GIMP in a Canvas window. Be sure to read the documentation thoroughly to get the most from this interface, including the links to the scanning tips web pages.

The Preview window allows both user-defined and automatic scan regions to be set. Black, gray and white points also can be set in the preview prior to the full-sized scan. The Viewer window provides limited editing.

QuiteInsane

Like XSane, QuiteInsane offers a GIMP plugin. However, this plugin is in early development and may not provide as much stability as XSane's. Beyond this, QuiteInsane offers much of the same functionality as XSane, plus a few extras. QuiteInsane's image viewer allows the user to select regions of the image to work with and permits printing directly from the image viewer.

Figure 2. The QuiteInsane Front End Managing the Epson Perfection 1260

QuiteInsane integrates into the KDE desktop, allowing drag-and-drop of images from the Image Viewer into other applications. Although integrating with other applications may not be required, it's a nice feature to have for desktop users.

______________________

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix