Installation of SANE Back Ends
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
Note
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 libusb-1.0.20,
include the configure switch --enable-libusb_1_0. Install
SANE-backends by running the
following commands:
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--with-group=scanner \
--with-docdir=/usr/share/doc/sane-backend-1.0.25 &&
make
If you want to test the results, some files need to be fixed:
sed -i -e 's/Jul 31 07:52:48 2013/Oct 19 13:25:20 2015/' \
-e 's/1.0.24git/1.0.25/' \
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 XSane-0.999. For a list of
frontend packages, see http://www.sane-project.org/sane-frontends.html.
To install SANE-frontends, use
the following commands:
sed -i -e "/SANE_CAP_ALWAYS_SETTABLE/d" src/gtkglue.c &&
./configure --prefix=/usr --mandir=/usr/share/man &&
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
Note
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.