08 December 2006

 

Scanning from Linux

Using a scanner with Linux can be a complicated affair, at least the setup part. For those looking for help on the issue linux.com offers a complete howto section on just that issue.
Since most scanners today are USB, I'll focus on that. The key file needed for this is libusb, which comes standard with most distributions. It may as well be required to mount usbdevfs or usbfs.
Also it is possible that you will need to create the device if it isn't created dynamically if devfsd is not running. Mknod can be used to create usb scanners if libusb is not configured correctly. To make the device you need to know what the device is named in /dev/usb. It could be scanner0, scanner1 or it could be usbscanner0. To make the device for the scanner from the root account you need to type for example:
mknod /dev/usbscanner0 c 180 48
Next you need to have SANE, which should automatically detect the scanner and appropriate front-end at this point.
Testing your scanner is as simple as making sure it's on and plugged into the computer the typing sane-find-scanner or scanimage --list-devices. This will give you information about the type and location of the scanner.
To scan an image from the command line type scanimage -d :/dev/ --format > outputfile.pnm (or .tiff)
This is a very basic summary to get you started. For a better description of the steps to follow please read the guide. If you have libusb, it will be a lot easier and just plugging the scanner in should get you to the step of testing the scanner. If you don't find the scanner then you may want to look at the other options. The command line can sometimes be the easiest way of doing things in Linux and very efficient, especially in this case.

Labels: , , ,


Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?