source: pst/scanning/sane.xml@ 31973174

systemd-13485
Last change on this file since 31973174 was ac38e9dc, checked in by Douglas R. Reno <renodr@…>, 9 years ago

Import back into SVN from Github

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@16309 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 23.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!-- <!ENTITY sane-be-download-http "http://alioth.debian.org/frs/?group_id=30186"> -->
8 <!ENTITY sane-be-download-http "http://fossies.org/linux/misc//sane-backends-&sane-version;.tar.gz">
9 <!ENTITY sane-be-download-ftp " ">
10 <!--<!ENTITY sane-be-download-ftp "ftp://ftp2.sane-project.org/pub/sane/sane-backends-&sane-version;.tar.gz">-->
11 <!--<!ENTITY sane-be-download-ftp "&gentoo-ftp-repo;/sane-backends-&sane-version;.tar.gz">-->
12 <!ENTITY sane-be-md5sum "1ca68e536cd7c1852322822f5f6ac3a4">
13 <!ENTITY sane-be-size "5.6 MB">
14 <!ENTITY sane-be-buildsize "97 MB">
15 <!ENTITY sane-be-time "1.0 SBU">
16
17 <!ENTITY sane-fe-download-http "http://alioth.debian.org/frs/download.php/file/1140/sane-frontends-&sane-fe-version;.tar.gz">
18 <!ENTITY sane-fe-download-ftp "ftp://ftp2.sane-project.org/pub/sane/sane-frontends-&sane-fe-version;.tar.gz">
19 <!ENTITY sane-fe-md5sum "c63bf7b0bb5f530cf3c08715db721cd3">
20 <!ENTITY sane-fe-size "231 KB">
21 <!ENTITY sane-fe-buildsize "3.0 MB">
22 <!ENTITY sane-fe-time "less than 0.1 SBU">
23]>
24
25<sect1 id="sane" xreflabel="SANE-&sane-version;">
26 <?dbhtml filename="sane.html"?>
27
28 <sect1info>
29 <othername>$LastChangedBy$</othername>
30 <date>$Date$</date>
31 </sect1info>
32
33 <title>SANE-&sane-version;</title>
34
35 <indexterm zone="sane">
36 <primary sortas="a-SANE">SANE</primary>
37 </indexterm>
38
39 <sect2 role="package">
40 <title>Introduction to SANE</title>
41
42 <para><application>SANE</application> is short for Scanner Access Now Easy.
43 Scanner access; however, is far from easy, since every vendor has their own
44 protocols. The only known protocol that should bring some unity into this
45 chaos is the TWAIN interface, but this is too imprecise to allow a stable
46 scanning framework. Therefore, <application>SANE</application> comes with
47 its own protocol, and the vendor drivers can't be used.</para>
48
49 <para><application>SANE</application> is split into back ends and front
50 ends. The back ends are drivers for the supported scanners and cameras. The
51 front ends are user interfaces to access the backends.</para>
52
53 &lfs77_checked;
54
55 <!-- The upstream web site has the md5sums for the tarballs:
56 http://www.sane-project.org/sane-md5sums.txt.
57 But they do not provide the tarballs, so, the following paragraph
58 seems not applicable, starting with sane-backends-1.0.24.tar.gz.
59
60 This note is not applicable. First, there is no issue downloading the
61 ftp://ftp2.sane-project.org/pub/sane/sane-backends-1.0.23.tar.gz
62 tarball with wget. Next, the combined tarball exists on the SANE FTP
63 site, but the MD5sum is wrong. We can simply point the download to
64 the SANE FTP site and create our own MD5sum (as we do on many packages).
65
66 <note><para>The upstream web site uses a self signed security
67 certificate. If using <command>wget</command>, the option -no-check-certificate
68 needs to be added.</para>
69
70 <para>The md5sum of the backend file does not match unless the three parts
71 of the divided tarball on the upstream server,
72 sane-backends-1.0.23.tar.gz.[1-3], are combined. A combined tarball with
73 the correct md5sum is located at <ulink
74 url="http://anduin.linuxfromscratch.org/sources/other/sane-backends-1.0.23.tar.gz">http://anduin.linuxfromscratch.org/sources/other/sane-backends-1.0.23.tar.gz</ulink>.</para></note>
75 -->
76
77 <bridgehead renderas="sect3">Back Ends Package Information</bridgehead>
78 <itemizedlist spacing='compact'>
79 <listitem>
80 <para>Download (HTTP): <ulink url="&sane-be-download-http;"/></para>
81 </listitem>
82 <listitem>
83 <para>Download (FTP): <ulink url="&sane-be-download-ftp;"/></para>
84 </listitem>
85 <listitem>
86 <para>Download MD5 sum: &sane-be-md5sum;</para>
87 </listitem>
88 <listitem>
89 <para>Download size: &sane-be-size;</para>
90 </listitem>
91 <listitem>
92 <para>Estimated disk space required: &sane-be-buildsize;</para>
93 </listitem>
94 <listitem>
95 <para>Estimated build time: &sane-be-time;</para>
96 </listitem>
97 </itemizedlist>
98
99 <bridgehead renderas="sect3">Front Ends Package Information</bridgehead>
100 <itemizedlist spacing='compact'>
101 <listitem>
102 <para>Download (HTTP): <ulink url="&sane-fe-download-http;"/></para>
103 </listitem>
104 <listitem>
105 <para>Download (FTP): <ulink url="&sane-fe-download-ftp;"/></para>
106 </listitem>
107 <listitem>
108 <para>Downlaod MD5 sum: &sane-fe-md5sum;</para>
109 </listitem>
110 <listitem>
111 <para>Download size: &sane-fe-size;</para>
112 </listitem>
113 <listitem>
114 <para>Estimated disk space required: &sane-fe-buildsize;</para>
115 </listitem>
116 <listitem>
117 <para>Estimated build time: &sane-fe-time;</para>
118 </listitem>
119 </itemizedlist>
120<!--
121 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
122 <itemizedlist spacing="compact">
123 <listitem>
124 <para>Required patch:
125 <ulink url="&patch-root;/sane-backends-&sane-version;-v4l-1.patch"/>
126 </para>
127 </listitem>
128 </itemizedlist>
129-->
130 <bridgehead renderas="sect3">SANE Dependencies</bridgehead>
131
132 <bridgehead renderas="sect4">Optional (Back Ends)</bridgehead>
133 <para role="optional">
134 <xref linkend="avahi"/>,
135 <xref linkend="cups"/>,
136 <xref linkend="libjpeg"/>,
137 <xref linkend="libtiff"/>,
138 <xref linkend="libusb"/>,
139 <xref linkend="v4l-utils"/>,
140 <ulink url="http://www.net-snmp.org/">Net-SNMP</ulink>,
141 <ulink url="http://cyberelk.net/tim/libieee1284/">libieee1284</ulink>,
142 <ulink url="http://www.gphoto.org/">libgphoto2</ulink>, and
143 <xref linkend="texlive"/> (or <xref linkend="tl-installer"/>)
144 </para>
145
146 <bridgehead renderas="sect4">Optional (Front Ends)</bridgehead>
147 <para role="optional">
148 <xref linkend="x-window-system"/>,
149 <xref linkend="gtk2"/>, and
150 <xref linkend="gimp"/>
151 </para>
152
153 <para condition="html" role="usernotes">User Notes:
154 <ulink url="&blfs-wiki;/sane"/></para>
155
156 </sect2>
157
158 <sect2 role="kernel" id='sane-kernel'>
159 <title>Kernel Configuration, Drivers and Additional Packages</title>
160
161 <indexterm zone="sane sane-kernel">
162 <primary sortas="d-Scanning-devices">Scanning devices</primary>
163 </indexterm>
164
165 <para>To access your scanner, you will probably need the related kernel
166 drivers and/or additional support packages. A SCSI scanner will need SCSI
167 drivers, a parallel port scanner needs parallel port support (you should
168 use enhanced EPP modes) and perhaps <ulink
169 url="http://cyberelk.net/tim/libieee1284/">libieee1284</ulink>, and a USB
170 scanner will need the <xref linkend="libusb"/> package. For HP devices, you
171 may need <ulink
172 url="http://sourceforge.net/projects/hplip/files/hplip/">hplip</ulink>.
173 Ensure you have the necessary drivers properly configured to access
174 the devices.</para>
175
176 </sect2>
177
178 <sect2 role="installation">
179 <title>Installation of SANE</title>
180
181 <sect3>
182 <title>Installation of SANE Back Ends</title>
183
184 <note>
185 <para>
186 You may safely disregard any messages printed on the screen when you
187 unpack the tarball.
188 </para>
189 </note>
190
191 <para>The <application>SANE</application> daemon should run with its own
192 group. Create this group by issuing the following commands as the
193 <systemitem class="username">root</systemitem> user:</para>
194
195<screen><userinput>groupadd -g 70 scanner</userinput></screen>
196
197 <note>
198 <para>
199 The user building <application>SANE</application>-backends should be
200 a member of the <systemitem class="groupname">scanner</systemitem>
201 group before proceeding. After you have added the user building the
202 package to the <systemitem class="groupname">scanner</systemitem>
203 group, issue the following command to create a new shell:
204 </para>
205
206<screen><userinput>su $(whoami)</userinput></screen>
207
208 <para>
209 Check the output of the <userinput>groups</userinput> command and
210 ensure the user is a member of the
211 <systemitem class="groupname">scanner</systemitem> group.
212 </para>
213 </note>
214
215 <para>
216 Fix linking with the systemd library when using <application>systemd</application>
217 210 and later:
218 </para>
219
220<screen><userinput>sed -i "s:systemd-daemon:systemd:g" configure configure.in</userinput></screen>
221
222 <para>For a USB scanner, if you are linking to <xref linkend="libusb"/>,
223 include the configure switch --enable-libusb_1_0. Install
224 <application>SANE</application>-backends by running the following
225 commands:</para>
226
227 <!-- Not sure why this was there as it works if TeX is installed
228 and it doesn't try to use it if TeX is not installed
229 -disable-latex &amp;&amp; -->
230
231<screen><userinput>./configure --prefix=/usr \
232 --sysconfdir=/etc \
233 --localstatedir=/var \
234 --with-docdir=/usr/share/doc/sane-backend-&sane-version; \
235 --with-group=scanner &amp;&amp;
236make &amp;&amp;
237exit</userinput></screen>
238
239 <para>If you want to test the results, some files need to be fixed:</para>
240
241<screen><userinput>sed -i -e 's/Jul 31 07:52:48/Oct 7 08:58:33/' \
242 -e 's/1.0.24git/1.0.24/' \
243 testsuite/tools/data/db.ref \
244 testsuite/tools/data/html-mfgs.ref \
245 testsuite/tools/data/usermap.ref \
246 testsuite/tools/data/html-backends-split.ref \
247 testsuite/tools/data/udev+acl.ref \
248 testsuite/tools/data/udev.ref</userinput></screen>
249
250 <para>To test the results, issue: <command>make check</command>.</para>
251
252 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
253
254<screen role="root"><userinput>make install &amp;&amp;
255install -v -m644 tools/udev/libsane.rules \
256 /etc/udev/rules.d/65-scanner.rules &amp;&amp;
257chgrp -v scanner /var/lock/sane</userinput></screen>
258
259 <para>With the scanner on, run <command>scanimage -L</command> and the
260 name and location of the device should appear. You need to configure
261 the device drivers in order to run this test.</para>
262
263 </sect3>
264
265 <sect3>
266 <title>Installation of SANE Front Ends</title>
267
268 <para>The <application>SANE</application>-frontends package
269 includes the graphical frontends <command>xscanimage</command> and
270 <command>xcam</command>, and a command-line frontend
271 <command>scanadf</command>. You don't need this package if you intend
272 to use one of the more advanced graphical frontends like
273 <xref linkend="xsane"/>. For a list of frontend packages, see
274 <ulink url="http://www.sane-project.org/sane-frontends.html"/>.</para>
275
276 <para>To install <application>SANE</application>-frontends,
277 use the following commands:</para>
278
279<screen><userinput>sed -i -e "/SANE_CAP_ALWAYS_SETTABLE/d" src/gtkglue.c &amp;&amp;
280./configure --prefix=/usr --mandir=/usr/share/man &amp;&amp;
281make</userinput></screen>
282
283 <para>This package does not come with a test suite.</para>
284
285 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
286
287<screen role="root"><userinput>make install &amp;&amp;
288install -v -m644 doc/sane.png xscanimage-icon-48x48-2.png \
289 /usr/share/sane</userinput></screen>
290
291 <para>If <application>GIMP</application> was linked into the build and
292 you wish <application>GIMP</application> to use
293 <command>xscanimage</command> as a scanning plugin, issue the following
294 command as the <systemitem class="username">root</systemitem> user:</para>
295
296<screen role="root"><userinput>ln -sfv ../../../../bin/xscanimage /usr/lib/gimp/2.0/plug-ins</userinput></screen>
297
298 <note>
299 <para>
300 If the plugin <command>xscanimage</command> is disabled in
301 <application>GIMP</application>'s menu, in order to enable it,
302 "create" a blank image using the menu or Ctrl-N. After that, it is
303 enabled.
304 </para>
305 </note>
306
307 </sect3>
308
309 </sect2>
310
311 <sect2 role="commands">
312 <title>Command Explanations</title>
313
314 <para><parameter>--sysconfdir=/etc</parameter>: This switch installs the
315 configuration files in <filename class="directory">/etc/sane.d</filename>
316 instead of <filename class="directory">/usr/etc/sane.d</filename>.</para>
317
318 <para><parameter>--with-group=scanner</parameter>: This parameter causes
319 the directory created for the locking files to be group owned by the
320 <systemitem class="groupname">scanner</systemitem> group instead of the
321 default <systemitem class="groupname">uucp</systemitem> group.</para>
322
323 <para><command>exit</command>: This command is used to exit the shell
324 created by the <command>su</command> command.</para>
325 </sect2>
326
327 <sect2 role="configuration">
328 <title>Configuring SANE</title>
329
330 <sect3 id="sane-config">
331 <title>Config Files</title>
332
333 <para><filename>/etc/sane.d/*.conf</filename></para>
334
335 <indexterm zone="sane sane-config">
336 <primary sortas="e-etc-sane.d-conf">/etc/sane.d/*.conf</primary>
337 </indexterm>
338
339 </sect3>
340
341 <sect3>
342 <title>Configuration Information</title>
343
344 <sect4>
345 <title>Backend Configuration</title>
346
347 <para>The backend configuration files are located in
348 <filename class='directory'>/etc/sane.d</filename>. Information
349 for configuring the various backends can be found by using the man(5)
350 page for the desired backend. Run
351 <command>man sane-<replaceable>&lt;backend&gt;</replaceable></command>,
352 substituting the desired backend.</para>
353
354 <para>Add any desired users to the <systemitem
355 class="groupname">scanner</systemitem> group.</para>
356
357 <para>If you want to access a network scanner, include two lines in
358 <filename>net.conf</filename>, as <systemitem class="username">root</systemitem> user
359 (make sure to replace &lt;server_ip&gt; by the actual value, below):</para>
360
361<screen role="root"><userinput>cat &gt;&gt; /etc/sane.d/net.conf &lt;&lt; "EOF"
362connect_timeout = 60
363&lt;server_ip&gt;
364EOF</userinput></screen>
365
366 <para>On the server side, include the client ip in the access list of
367 <filename>/etc/sane.d/saned.conf</filename>, restart the
368 <command>saned</command> daemon, and make sure the firewall, if any, is
369 open to the client.</para>
370
371 </sect4>
372
373 <sect4>
374 <title>Frontend Configuration</title>
375 <para>
376 If you use a desktop environment like <application>Gnome</application>
377 or <application>KDE</application> you may wish to create a
378 <filename>xscanimage.desktop</filename> file so that
379 <application>xscanimage</application> appears in the panel's menus.
380 As the <systemitem class="username">root</systemitem> user:
381 </para>
382
383<screen role="root"><userinput>mkdir -pv /usr/share/{applications,pixmaps} &amp;&amp;
384
385cat &gt; /usr/share/applications/xscanimage.desktop &lt;&lt; "EOF" &amp;&amp;
386[Desktop Entry]
387Encoding=UTF-8
388Name=XScanImage - Scanning
389Comment=Acquire images from a scanner
390Exec=xscanimage
391Icon=xscanimage
392Terminal=false
393Type=Application
394Categories=Application;Graphics
395EOF
396
397ln -sfv ../sane/xscanimage-icon-48x48-2.png /usr/share/pixmaps/xscanimage.png</userinput></screen>
398
399 </sect4>
400
401 <sect4>
402 <title>General Information</title>
403
404 <para>For general information about configuring and using
405 <application>SANE</application>, see <command>man sane</command>.
406 Linux-2.6.x brings some special issues into the picture. See
407 <ulink url="http://www.sane-project.org/README.linux"/> for
408 information about using <application>SANE</application> with the
409 Linux-2.6.x kernel. For information about USB scanning devices,
410 run <command>man sane-usb</command>. For information about SCSI
411 devices, run <command>man sane-scsi</command>.</para>
412
413 </sect4>
414
415 <sect4>
416 <title>Configuration and setup of the 'saned' daemon</title>
417
418 <para>The <command>saned</command> daemon is not meant to be used for
419 untrusted clients. You should provide <xref linkend="fw-firewall"/>
420 protection to ensure only trusted
421 clients access the daemon. Due to the complex security requirements to
422 ensure only trusted clients access the daemon, BLFS does not provide
423 instructions to configure the <command>saned</command> daemon. If you
424 desire to make the daemon available, ensure you provide adequate
425 security, configure your <filename>[x]inetd.conf</filename> file and
426 send a <userinput>SIGHUP</userinput> to the [x]inetd daemon. Some good
427 information for setting up and securing the <command>saned</command>
428 daemon can be found at
429 <ulink url="http://penguin-breeder.org/sane/saned/"/>.</para>
430
431 </sect4>
432
433 </sect3>
434
435 </sect2>
436
437 <sect2 role="content">
438 <title>Contents</title>
439
440 <bridgehead renderas="sect4">Back Ends:</bridgehead>
441 <segmentedlist>
442 <segtitle>Installed Programs</segtitle>
443 <segtitle>Installed Libraries</segtitle>
444 <segtitle>Installed Directories</segtitle>
445
446 <seglistitem>
447 <seg>gamma4scanimage, sane-config, saned, sane-find-scanner,
448 and scanimage</seg>
449 <seg>libsane.so and numerous scanner backend modules</seg>
450 <seg>/etc/sane.d, /usr/include/sane, /usr/lib/sane, /usr/share/sane,
451 and /usr/share/doc/sane-&sane-version;</seg>
452 </seglistitem>
453 </segmentedlist>
454
455 <bridgehead renderas="sect4">Front Ends:</bridgehead>
456 <segmentedlist>
457 <segtitle>Installed Programs</segtitle>
458 <segtitle>Installed Library</segtitle>
459 <segtitle>Installed Directories</segtitle>
460
461 <seglistitem>
462 <seg>scanadf, xcam, and xscanimage</seg>
463 <seg><application>GIMP</application> plugin embedded in
464 <command>xscanimage</command></seg>
465 <seg>None</seg>
466 </seglistitem>
467 </segmentedlist>
468
469 <variablelist>
470 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
471 <?dbfo list-presentation="list"?>
472 <?dbhtml list-presentation="table"?>
473
474 <varlistentry id="gamma4scanimage">
475 <term><command>gamma4scanimage</command></term>
476 <listitem>
477 <para>creates a gamma table in the format expected by
478 <command>scanimage</command>.</para>
479 <indexterm zone="sane gamma4scanimage">
480 <primary sortas="b-gamma4scanimage">gamma4scanimage</primary>
481 </indexterm>
482 </listitem>
483 </varlistentry>
484
485 <varlistentry id="sane-config-prog">
486 <term><command>sane-config</command></term>
487 <listitem>
488 <para>is a tool used to determine the compiler and linker
489 flags that should be used to compile and link
490 <application>SANE</application>.</para>
491 <indexterm zone="sane sane-config-prog">
492 <primary sortas="b-sane-config">sane-config</primary>
493 </indexterm>
494 </listitem>
495 </varlistentry>
496
497 <varlistentry id="saned">
498 <term><command>saned</command></term>
499 <listitem>
500 <para>is the <application>SANE</application> daemon that
501 allows remote clients to access image acquisition devices
502 available on the local host.</para>
503 <indexterm zone="sane saned">
504 <primary sortas="b-saned">saned</primary>
505 </indexterm>
506 </listitem>
507 </varlistentry>
508
509 <varlistentry id="sane-find-scanner">
510 <term><command>sane-find-scanner</command></term>
511 <listitem>
512 <para>is a command-line tool to find SCSI and
513 USB scanners and determine their device files. Its primary
514 purpose is to make sure that scanners can be detected by
515 <application>SANE</application> backends.</para>
516 <indexterm zone="sane sane-find-scanner">
517 <primary sortas="b-sane-find-scanner">sane-find-scanner</primary>
518 </indexterm>
519 </listitem>
520 </varlistentry>
521
522 <varlistentry id="scanadf">
523 <term><command>scanadf</command></term>
524 <listitem>
525 <para>is a command-line interface to control image acquisition
526 devices which are equipped with an automatic document feeder
527 (ADF).</para>
528 <indexterm zone="sane scanadf">
529 <primary sortas="b-scanadf">scanadf</primary>
530 </indexterm>
531 </listitem>
532 </varlistentry>
533
534 <varlistentry id="scanimage">
535 <term><command>scanimage</command></term>
536 <listitem>
537 <para>is a command line interface for scanning from image acquisition
538 devices such as flatbed scanners or cameras. It is also used to list
539 the available backend devices.</para>
540 <indexterm zone="sane scanimage">
541 <primary sortas="b-scanimage">scanimage</primary>
542 </indexterm>
543 </listitem>
544 </varlistentry>
545
546 <varlistentry id="xcam">
547 <term><command>xcam</command></term>
548 <listitem>
549 <para>is a graphical camera front end for
550 <application>SANE</application>.</para>
551 <indexterm zone="sane xcam">
552 <primary sortas="b-xcam">xcam</primary>
553 </indexterm>
554 </listitem>
555 </varlistentry>
556
557 <varlistentry id="xscanimage">
558 <term><command>xscanimage</command></term>
559 <listitem>
560 <para>is a graphical user interface for scanning.</para>
561 <indexterm zone="sane xscanimage">
562 <primary sortas="b-xscanimage">xscanimage</primary>
563 </indexterm>
564 </listitem>
565 </varlistentry>
566
567 <varlistentry id="libsane">
568 <term><filename class='libraryfile'>libsane.so</filename></term>
569 <listitem>
570 <para>is the application programming interface that is used to
571 communicate between frontends and backends.</para>
572 <indexterm zone="sane libsane">
573 <primary sortas="c-libsane">libsane.so</primary>
574 </indexterm>
575 </listitem>
576 </varlistentry>
577
578 <varlistentry id="libsane-module">
579 <term><filename class='libraryfile'>libsane-*.so</filename></term>
580 <listitem>
581 <para>modules are backend scanning library plugins used to interface
582 with scanning devices. See
583 <ulink url="http://www.sane-project.org/sane-supported-devices.html"/>
584 for a list of supported backends.</para>
585 <indexterm zone="sane libsane-module">
586 <primary sortas="c-libsane-module">libsane-*.so</primary>
587 </indexterm>
588 </listitem>
589 </varlistentry>
590
591 </variablelist>
592
593 </sect2>
594
595</sect1>
Note: See TracBrowser for help on using the repository browser.