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
configure assumes that the user building
SANE-backends is a member of the
scanner
group for testing
the existence of this group. So the user building the package should
be added to the scanner
group. As the root
user:
usermod -G scanner -a username
After adding the scanner
group as above, you will need to log out and back in to activate it.
For a USB scanner, if you are linking to libusb-1.0.26,
include the configure switch --enable-libusb_1_0. Install
SANE-backends by running the following
commands:
sg scanner -c " \
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--with-group=scanner \
--with-lockdir=/run/lock \
--docdir=/usr/share/doc/sane-backends-1.0.32" &&
make
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 &&
mkdir -p /run/lock/sane &&
chgrp -v scanner /run/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:
tar -xf ../sane-frontends-1.0.14.tar.gz &&
cd sane-frontends-1.0.14 &&
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.