source: pst/scanning/sane.xml@ d7bee48

systemd-13485
Last change on this file since d7bee48 was 293e9cdc, checked in by DJ Lucas <dj@…>, 9 years ago

Merge PST and Printing section from trunk.

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

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