Abstract
This section will explain how to install and use scanners by means of ScannerDrake (the scanner wizard), SANE and XSane (scanner interface software). It will also give, at the end of the section, a list of other scanner interface software working under GNU/Linux.
Using scanners under Mandrake Linux has never been easier. If your scanner is supported by SANE, which is very likely if it is a recent USB scanner, you only have to connect it to the computer, turn it on and launch your favorite image-acquisition application.
If this doesn't happen, don't worry: thanks to the ScannerDrake wizard you will have your scanner identified, configured and ready to work in just a few minutes.
Note that, while support is now very good for these kind of devices, not all scanners are supported under GNU/Linux: before buying new hardware, it's always a good idea to visit Mandrakesoft's Hardware Database, the Linux Hardware Database web site, and the SANE home page, to check for compatibility issues.
If your computer is connected to a LAN, you might be interested in running the ScannerDrake wizard to take advantage of a new feature: scanner sharing.
Thanks to the great improvements of the SANE software, most modern scanners need no configuration at all: it should be possible to just connect a scanner to the computer, turn it on, and launch the image acquisition software. The scanner will be automatically recognized by the scanning software and you will be able to use it at once.
If you are a GNOME or KDE user, moreover, when a scanner is plugged in and turned on you will see a very convenient icon appear on your desktop, as shown in Figure 2.19. Thanks to this new feature, known as “dynamic icons”, the icon pointing to your scanner will magically pop up when you turn the scanner on to do some work, and disappear when you turn the scanner off.
Clicking on the icon should launch the XSane software, a frontend to SANE, so that you can begin using your scanner immediately. If the icon fails to show up, or XSane doesn't seem to work, the reason could be any of the following:
The dynamic icons feature isn't working properly on your system: make sure that you installed the hotplug and dynamic packages.
The SANE software is not installed on your system, possibly because you didn't select it at installation time. Please start ScannerDrake to get it installed automatically or refer to Section , “The SANE software” section to learn how to install all of the required packages.
The SANE software is installed on your system, and dynamic icons are working, but XSane can't be used because your scanner has not been automatically recognized. If this is the case, read the Section , “ScannerDrake” section to learn how to configure your scanner using ScannerDrake.
Your scanner is not a USB scanner. The dynamic icons only work for USB scanners. In this case launch XSane by selecting the item in the desktop menu.
If your scanner is a USB scanner, you can be confident that it will be automatically recognized by SANE. SCSI and parallel port scanners, on the other hand will probably require the ScannerDrake wizard.
SANE, which stands for “Scanner Access Now Easy”, is an interface for scanners and other image-acquisition devices like digital cameras and framebuffers. SANE sits in the middle between the device and the acquisition/image processing software, in order to allow developers to write application software without worrying about device drivers.
The SANE software consists of three packages: the SANE library (libsane1), the SANE back-ends (sane-backends, the modules for the scanner devices) and the SANE front-ends (sane-frontends, basic programs for scanning images).
If you haven't installed the SANE packages during the installation process, the easiest option is to run ScannerDrake because it installs the packages automatically during its first start. You can also use RpmDrake, the Mandrake Linux software manager. Just remember to have your Mandrake Linux installation CDs near at hand, because you will be prompted to insert the one holding the packages in your CD-ROM drive. Please refer to Chapter 7, RpmDrake: Package Management if you need to install them by hand and you are not yet comfortable with package management.
At this stage, it doesn't matter if your scanner is turned on: SANE will happily install even if there's no physical device connected to the computer (yet).
ScannerDrake is the Mandrake Linux scanner detection and configuration tool. This wizard will help you install your scanner if the automatic detection fails and, as of Mandrake Linux 9.1, it sports some interesting new features.
At the moment of writing this manual, ScannerDrake supports practically all USB scanners and the majority of SCSI and parallel port scanners. Once again, refer to the SANE home page for more information.
Before launching ScannerDrake, the connection interface (USB, SCSI or parallel port) must be working properly, the scanner itself must be connected to your computer and the power turned on. Refer to the manufacturer's manual to learn how to install and test your hardware.
When everything is ready, launch ScannerDrake. You can do this in two ways: you can just open a terminal window and type /usr/sbin/scannerdrake; or you can launch the Mandrake Control Center by selecting the item in the desktop main menu: when the main window appears, click on the Scanner icon in the Hardware section. Note that in both cases you will be asked for root's password.
The program will try to detect the manufacturer and model of your scanner, if it finds one which is ready to use it will show some information about it in the upper part of the wizard's main window. If, on the other hand, detection failed and no scanners were identified, you will be shown this window:
You can try to perform a new search clicking on , useful if you have just plugged in a scanner. If the automatic detections fails in any case, click on and look for the specific model you own by first expanding the manufacturer's section, then browsing through the list of available models.
After choosing the appropriate model, you will be asked to select the device your scanner is attached to. Unless it is a parallel port scanner, you can leave the default Auto-detect available ports option and click on Ok, as shown below. If this is not the case, please specify the parallel port by clicking on the pull-down menu and choosing the appropriate entry. Usually there is only one parallel port in a computer, so selecting /dev/parport0 should be the right choice.
Now your scanner is installed and you are ready to use the programs that come with SANE, XSane or other acquisition software.
Note that HP multi-function devices, like the OfficeJet or PSC printers, must be configured through PrinterDrake. See Section , “PrinterDrake: Configuring Printers” for more information on the subject of printer configuration. The scanning part of non-HP multi-function devices can be set up with ScannerDrake as a stand-alone scanner.
To test that everything works correctly, launch xscanimage from a shell and try to acquire a picture with your scanner. You can first acquire a preview of the scanned image clicking on the Preview window button, as shown in Figure 2.23.
Note that xscanimage can also be invoked directly from GIMP, selecting the menu item, or choosing directly the [name_of_your_scanner]:/dev/usb/scanner0 sub-menu, where [name_of_your_scanner] will be the manufacturer's name of your scanner, e.g. , , , etc.
Starting from the version included in Mandrake Linux 9.1, ScannerDrake allows for scanner sharing among users connected via a local network. Installation is very easy just click on and check the option if you want to share a local scanner with other users connected on the same LAN; or the if you want to connect to a scanner some other computer on another network. With these buttons you can define which machines are allowed to use your scanners and to which machines the remote scanners you want to use are connected to.
While xscanimage is more than enough for your basic scanning needs, more experienced and/or graphic-oriented users will be glad to know that Mandrake Linux includes a more sophisticated program, XSane, which offers more options and a more informative display as regards the image acquisition process.
You can launch XSane by clicking on the desktop icon. If there is no icon on your desktop, perhaps because you use an environment different to either GNOME or KDE, you can launch the program selecting the item in the desktop main menu, or by typing xsane from a terminal window. You will see several windows pop up on the screen, as shown in Figure 2.25.
Moreover, if a supplementary package, xsane-gimp, is installed, you will have a GIMP plug-in at your disposal. This will allow you to import your images directly into GIMP for image retouching tasks (see the Graphic Art and Image Manipulation chapter from our on-line documentation). To do this, simply choose the menu item to launch XSane. Then you can go ahead and scan the image and it will be sent directly to GIMP, and you will be able to edit and retouch it.
Most modern scanners boast high resolutions, typically 600 DPI (Dot Per Inch) or even more, which can increase to higher values through interpolation. But it would be a mistake to perform all of your scanning at the maximum available resolution. It could happen that there is very little, if any, quality difference between a 300 and a 600 DPI image scan, but the file size will grow exponentially at higher values, up to many MBs of disk space for a single image file.
The resolution value should be chosen according to the device on which the image will be reproduced. For images that will be shown on computer monitors, e.g. web site images, the resolution will have to be as close as possible as the monitor's one, about 80 DPI (for a 1024x768 display, could be less for 800x600); higher values will result not only in “heavier” images, but the dimensions will also increase, so that an image scanned at 160 DPI instead of 80 will be about twice as large[1].
If you intend to print your images, a resolution of 150-200 DPI should be enough for most home printers; increase this value if you have a very high quality ink jet printer or a dye-sublimation one. Keep in mind that the value commonly used in printed magazines is 300 DPI.
Higher values should be chosen only for specific uses, such as enlarged images on very high quality printers, or scans of black and white originals. You will have to experiment a little until you are satisfied with the results.
Unfortunately, OCR (Optical Character Recognition) software is not as common or sophisticated as the image acquisition counterpart. There is at least two programs, however, that are mature enough: Clara OCR and GOCR/JOCR . They are now both part of Mandrake Linux, you will find all the necessary packages in the contrib CD.
Clara's graphic interface is very simple and doesn't require a specific desktop environment, such as GNOME or KDE, but it will be necessary to train the program on the scan of a sample page. The training process can be quite tedious, and not very intuitive for the newbie [2], so be sure to read the tutorial file. More experienced users should also refer to the Advanced User's Manual.
GOCR/JOCR is another project which has reached an usable status, but bear in mind that it's still beta software (latest release at the moment of writing was 0.37). GOCR/JOCR can read images in many formats, while its output is a simple text file. It's a command-line tool, so if you want to use a graphical frontend you will need to install the gocr-gtk package.
Here is a list of other scanner interface software which is known to work under GNU/Linux:
if you installed KDE, you will be able to use Kooka, a simple graphical front-end to SANE which is also able to perform OCR tasks; to launch it, select the from the main menu;
users of the FLTK (“Fast Light Tool Kit”) graphic user interface can try FlScan, a FLTK front-end for SANE;
for EPSON scanners, you can download Image Scan! for Linux, a scanner utility provided free of charge to GNU/Linux users by EPSON KOWA Corporation. It aims at achieving the same level of user friendliness and image quality as the Windows/Macintosh software bundled with the Epson scanners;
while multi-functional HP devices are configured using PrinterDrake, owners of these devices should have a look at the HP OfficeJet Linux driver project. The developers involved in the project aim at providing GNU/Linux support for most Hewlett-Packard OfficeJet, PSC, LaserJet, and PhotoSmart printer multi-function peripherals (MFPs).
[1] This, however, is a quick way to enlarge images taken from small originals. You could also scan at a higher resolution and then save it at half size, using graphic manipulation software like GIMP, to improve image quality if you are not satisfied with the result obtained at 80-90 DPI.
[2] To quote the authors: “Clara OCR is not simple to use. A basic knowledge about how it works is required for using it”.