%general-entities; ]> $LastChangedBy$ $Date$ SANE-&sane-version; SANE 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. &lfs77_checked; &gcc5_checked; Back Ends Package Information Download (HTTP): Download (FTP): Download MD5 sum: &sane-be-md5sum; Download size: &sane-be-size; Estimated disk space required: &sane-be-buildsize; Estimated build time: &sane-be-time; Front Ends Package Information Download (HTTP): Download (FTP): Downlaod MD5 sum: &sane-fe-md5sum; Download size: &sane-fe-size; Estimated disk space required: &sane-fe-buildsize; Estimated build time: &sane-fe-time; SANE Dependencies Optional (Back Ends) , , , , , , Net-SNMP, libieee1284, libgphoto2, and (or ) Optional (Front Ends) , , and User Notes: Kernel Configuration, Drivers and Additional Packages Scanning devices 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 package. For HP devices, you may need hplip. Ensure you have the necessary drivers properly configured to access the devices. Installation of SANE Installation of SANE Back Ends You may safely disregard any messages printed on the screen when you unpack the tarball. The SANE daemon should run with its own group. Create this group by issuing the following commands as the root user: groupadd -g 70 scanner The user building SANE-backends should be a member of the scanner group before proceeding. After you have added the user building the package to the scanner group, issue the following command to create a new shell: su $(whoami) Check the output of the groups command and ensure the user is a member of the scanner group. For a USB scanner, if you are linking to , include the configure switch --enable-libusb_1_0. Install SANE-backends by running the following commands: ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --with-docdir=/usr/share/doc/sane-backend-&sane-version; \ --with-group=scanner && make && exit If you want to test the results, some files need to be fixed: sed -i -e 's/Jul 31 07:52:48/Oct 7 08:58:33/' \ -e 's/1.0.24git/1.0.24/' \ testsuite/tools/data/db.ref \ testsuite/tools/data/html-mfgs.ref \ testsuite/tools/data/usermap.ref \ testsuite/tools/data/html-backends-split.ref \ testsuite/tools/data/udev+acl.ref \ testsuite/tools/data/udev.ref To test the results, issue: make check. Now, as the root user: make install && install -m 644 -v tools/udev/libsane.rules \ /etc/udev/rules.d/65-scanner.rules && chgrp -v scanner /var/lock/sane With the scanner on, run scanimage -L and the name and location of the device should appear. Of course, you need the device drivers configured, in order to run this test. 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 . For a list of frontend packages, see . To install SANE-frontends, use the following commands: sed -i -e "/SANE_CAP_ALWAYS_SETTABLE/d" src/gtkglue.c && ./configure --prefix=/usr && make 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 \ /usr/share/sane 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 If the plugin xscanimage is disabled in GIMP's menu, in order to enable it, "create" a blank image using the menu or Ctrl-N. After that, it is enabled. Command Explanations --sysconfdir=/etc: This switch installs the configuration files in /etc/sane.d instead of /usr/etc/sane.d. --with-group=scanner: This parameter causes the directory created for the locking files to be group owned by the scanner group instead of the default uucp group. exit: This command is used to exit the shell created by the su command. Configuring SANE Config Files /etc/sane.d/*.conf /etc/sane.d/*.conf 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. Add any desired users to the scanner group. If you want to access a network scanner, include two lines in net.conf, as root user (make sure to replace <server_ip> by the actual value, below): cat >> /etc/sane.d/net.conf << "EOF" connect_timeout = 60 <server_ip> EOF On the server side, include the client ip in the access list of /etc/sane.d/saned.conf, restart the saned daemon, and make sure the firewall, if any, is open to the client. Frontend Configuration If you use a desktop environment like Gnome or KDE you may wish to create a xscanimage.desktop file so that xscanimage appears in the panel's menus. As the root user: mkdir -pv /usr/share/{applications,pixmaps} && cat > /usr/share/applications/xscanimage.desktop << "EOF" && [Desktop Entry] Encoding=UTF-8 Name=XScanImage - Scanning Comment=Acquire images from a scanner Exec=xscanimage Icon=xscanimage Terminal=false Type=Application Categories=Application;Graphics EOF ln -svf ../sane/xscanimage-icon-48x48-2.png /usr/share/pixmaps/xscanimage.png 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 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 . Contents Back Ends: Installed Programs Installed Libraries Installed Directories gamma4scanimage, sane-config, saned, sane-find-scanner, and scanimage libsane.so and numerous scanner backend modules /etc/sane.d, /usr/include/sane, /usr/lib/sane, /usr/share/sane, and /usr/share/doc/sane-&sane-version; Front Ends: Installed Programs Installed Library Installed Directories scanadf, xcam, and xscanimage GIMP plugin embedded in xscanimage None Short Descriptions gamma4scanimage creates a gamma table in the format expected by scanimage. gamma4scanimage sane-config is a tool used to determine the compiler and linker flags that should be used to compile and link SANE. sane-config saned is the SANE daemon that allows remote clients to access image acquisition devices available on the local host. saned sane-find-scanner 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. sane-find-scanner scanadf is a command-line interface to control image acquisition devices which are equipped with an automatic document feeder (ADF). scanadf scanimage 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. scanimage xcam is a graphical camera front end for SANE. xcam xscanimage is a graphical user interface for scanning. xscanimage libsane.so is the application programming interface that is used to communicate between frontends and backends. libsane.so libsane-*.so modules are backend scanning library plugins used to interface with scanning devices. See for a list of supported backends. libsane-*.so