source: pst/scanning/sane.xml@ 5b5d604

10.1 11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 5b5d604 was 691ee02, checked in by Pierre Labastie <pieere@…>, 3 years ago

typo

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@23852 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 21.2 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 "&sources-anduin-http;/sane/sane-backends-&sane-version;.tar.gz">
8 <!ENTITY sane-be-download-ftp " ">
9 <!ENTITY sane-be-md5sum "f2618408712399661358ed1ad995f046">
10 <!ENTITY sane-be-size "6.9 MB">
11 <!ENTITY sane-be-buildsize "364 MB (with tests)">
12 <!ENTITY sane-be-time "0.7 SBU (with tests)">
13
14 <!ENTITY sane-fe-download-http "&sources-anduin-http;/sane/sane-frontends-&sane-fe-version;.tar.gz">
15 <!ENTITY sane-fe-download-ftp " ">
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">
20]>
21
22<sect1 id="sane" xreflabel="SANE-&sane-version;">
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>
40 <application>SANE</application> is short for Scanner Access Now Easy.
41 Scanner access, however, is far from easy, since every vendor has their
42 own protocols. The only known protocol that should bring some unity into
43 this chaos is the TWAIN interface, but this is too imprecise to allow a
44 stable scanning framework. Therefore, <application>SANE</application>
45 comes with its own protocol, and the vendor drivers can't be used.
46 </para>
47
48 <para>
49 <application>SANE</application> is split into back ends and front ends.
50 The back ends are drivers for the supported scanners and cameras. The
51 front ends are user interfaces to access the backends.
52 </para>
53
54 &lfs10_checked;
55
56 <bridgehead renderas="sect3">Back Ends Package Information</bridgehead>
57 <itemizedlist spacing='compact'>
58 <listitem>
59 <para>
60 Download (HTTP): <ulink url="&sane-be-download-http;"/>
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Download (FTP): <ulink url="&sane-be-download-ftp;"/>
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Download MD5 sum: &sane-be-md5sum;
71 </para>
72 </listitem>
73 <listitem>
74 <para>
75 Download size: &sane-be-size;
76 </para>
77 </listitem>
78 <listitem>
79 <para>
80 Estimated disk space required: &sane-be-buildsize;
81 </para>
82 </listitem>
83 <listitem>
84 <para>
85 Estimated build time: &sane-be-time;
86 </para>
87 </listitem>
88 </itemizedlist>
89
90 <bridgehead renderas="sect3">Additional Downloads (Front Ends)</bridgehead>
91 <itemizedlist spacing='compact'>
92 <listitem>
93 <para>
94 Download (HTTP): <ulink url="&sane-fe-download-http;"/>
95 </para>
96 </listitem>
97 <listitem>
98 <para>
99 Download (FTP): <ulink url="&sane-fe-download-ftp;"/>
100 </para>
101 </listitem>
102 <listitem>
103 <para>
104 Downlaod MD5 sum: &sane-fe-md5sum;
105 </para>
106 </listitem>
107 <listitem>
108 <para>
109 Download size: &sane-fe-size;
110 </para>
111 </listitem>
112 <listitem>
113 <para>
114 Estimated disk space required: &sane-fe-buildsize;
115 </para>
116 </listitem>
117 <listitem>
118 <para>
119 Estimated build time: &sane-fe-time;
120 </para>
121 </listitem>
122 </itemizedlist>
123
124 <note>
125 <para>
126 The upstream location for these files is at
127 <ulink url="https://gitlab.com/sane-project"/> but
128 the file URLs use embedded md5sums. For convenience,
129 the packages have been copied to the localion above.
130 </para>
131 </note>
132
133 <bridgehead renderas="sect3">SANE Dependencies</bridgehead>
134
135 <bridgehead renderas="sect4">Optional (Back Ends)</bridgehead>
136 <para role="optional">
137 <xref linkend="avahi"/>,
138 <xref linkend="cups"/>,
139 <xref linkend="libjpeg"/>,
140 <xref linkend="libtiff"/>,
141 <xref linkend="libusb"/>,
142 <xref linkend="v4l-utils"/>,
143 <ulink url="http://www.net-snmp.org/">Net-SNMP</ulink>,
144 <ulink url="http://cyberelk.net/tim/libieee1284/">libieee1284</ulink>,
145 <ulink url="http://www.gphoto.org/">libgphoto2</ulink>, and
146 <xref linkend="texlive"/> (or <xref linkend="tl-installer"/>)
147 </para>
148
149 <bridgehead renderas="sect4">Optional (Front Ends)</bridgehead>
150 <para role="optional">
151 <xref linkend="x-window-system"/>,
152 <xref linkend="gtk2"/>, and
153 <xref linkend="gimp"/>
154 </para>
155
156 <para condition="html" role="usernotes">User Notes:
157 <ulink url="&blfs-wiki;/sane"/></para>
158
159 </sect2>
160
161 <sect2 role="kernel" id='sane-kernel'>
162 <title>Kernel Configuration, Drivers and Additional Packages</title>
163
164 <indexterm zone="sane sane-kernel">
165 <primary sortas="d-Scanning-devices">Scanning devices</primary>
166 </indexterm>
167
168 <para>
169 To access your scanner, you will probably need the related kernel
170 drivers and/or additional support packages. A SCSI scanner will need SCSI
171 drivers, a parallel port scanner needs parallel port support (you should
172 use enhanced EPP modes) and perhaps <ulink
173 url="http://cyberelk.net/tim/libieee1284/">libieee1284</ulink>, and a USB
174 scanner will need the <xref linkend="libusb"/> package. For HP devices,
175 you may need <ulink
176 url="http://sourceforge.net/projects/hplip/files/hplip/">hplip</ulink>.
177 Ensure you have the necessary drivers properly configured to access
178 the devices.
179 </para>
180
181 </sect2>
182
183 <sect2 role="installation">
184 <title>Installation of SANE</title>
185
186 <sect3>
187 <title>Installation of SANE Back Ends</title>
188
189 <para>
190 The <application>SANE</application> daemon should run with its own
191 group. Create this group by issuing the following commands as the
192 <systemitem class="username">root</systemitem> user:
193 </para>
194
195<screen role="root"><userinput>groupadd -g 70 scanner</userinput></screen>
196
197 <note>
198 <para>
199 <command>configure</command> assumes that the user building
200 <application>SANE</application>-backends is a member of the
201 <systemitem class="groupname">scanner</systemitem> group for testing
202 the existence of this group. So the user building the package should
203 be added to the <systemitem class="groupname">scanner</systemitem>
204 group. As the <systemitem class="username">root</systemitem> user:
205 </para>
206
207<screen role="root"><userinput>usermod -G scanner -a <replaceable>username</replaceable></userinput></screen>
208
209 <para>
210 After adding the <systemitem class="groupname">scanner</systemitem>
211 group as above, you will need to log out and back in to activate it.
212 </para>
213
214 </note>
215
216 <para>
217 For a USB scanner, if you are linking to <xref linkend="libusb"/>,
218 include the configure switch --enable-libusb_1_0. Install
219 <application>SANE</application>-backends by running the following
220 commands:
221 </para>
222
223<screen><userinput>sg scanner -c " \
224./configure --prefix=/usr \
225 --sysconfdir=/etc \
226 --localstatedir=/var \
227 --with-group=scanner \
228 --with-docdir=/usr/share/doc/sane-backends-&sane-version;" &amp;&amp;
229make</userinput></screen>
230
231 <para>
232 To test the results, issue: <command>make check</command>.
233 </para>
234
235 <para>
236 Now, as the <systemitem class="username">root</systemitem> user:
237 </para>
238
239<screen role="root"><userinput>make install &amp;&amp;
240install -m 644 -v tools/udev/libsane.rules \
241 /etc/udev/rules.d/65-scanner.rules &amp;&amp;
242chgrp -v scanner /var/lock/sane</userinput></screen>
243
244 <para>
245 With the scanner on, run <command>scanimage -L</command> and the
246 name and location of the device should appear. Of course, you need the
247 device drivers configured, in order to run this test.
248 </para>
249
250 </sect3>
251
252 <sect3>
253 <title>Installation of SANE Front Ends</title>
254
255 <para>
256 The <application>SANE</application>-frontends package
257 includes the graphical frontends <command>xscanimage</command> and
258 <command>xcam</command>, and a command-line frontend
259 <command>scanadf</command>. You don't need this package if you intend
260 to use one of the more advanced graphical frontends like
261 <xref linkend="xsane"/>. For a list of frontend packages, see
262 <ulink url="http://www.sane-project.org/sane-frontends.html"/>.
263 </para>
264
265 <para>
266 To install <application>SANE</application>-frontends,
267 use the following commands:
268 </para>
269
270<screen><userinput>tar -xf ../sane-frontends-&sane-fe-version;.tar.gz &amp;&amp;
271cd sane-frontends-&sane-fe-version; &amp;&amp;
272
273sed -i -e "/SANE_CAP_ALWAYS_SETTABLE/d" src/gtkglue.c &amp;&amp;
274./configure --prefix=/usr --mandir=/usr/share/man &amp;&amp;
275make</userinput></screen>
276
277 <para>
278 This package does not come with a test suite.
279 </para>
280
281 <para>
282 Now, as the <systemitem class="username">root</systemitem> user:
283 </para>
284
285<screen role="root"><userinput>make install &amp;&amp;
286install -v -m644 doc/sane.png xscanimage-icon-48x48-2.png \
287 /usr/share/sane</userinput></screen>
288
289 <para>
290 If <application>GIMP</application> was linked into the build and
291 you wish <application>GIMP</application> to use
292 <command>xscanimage</command> as a scanning plugin, issue the following
293 command as the <systemitem class="username">root</systemitem> user:
294 </para>
295
296<screen role="root"><userinput>ln -v -s ../../../../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>
315 <command>sg scanner -c "..."</command>: runs the command between double
316 quotes with principal group <systemitem
317 class="groupname">scanner</systemitem>. This may be needed if the user
318 has been newly added to group scanner, and has not logged out and in.
319 </para>
320
321 <para>
322 <parameter>--sysconfdir=/etc</parameter>: This switch installs the
323 configuration files in <filename class="directory">/etc/sane.d</filename>
324 instead of <filename class="directory">/usr/etc/sane.d</filename>.
325 </para>
326
327 <para>
328 <parameter>--with-group=scanner</parameter>: This parameter causes
329 the directory created for the locking files to be group owned by the
330 <systemitem class="groupname">scanner</systemitem> group instead of the
331 default <systemitem class="groupname">uucp</systemitem> group.
332 </para>
333
334 <para>
335 <command>exit</command>: This command is used to exit the shell
336 created by the <command>su</command> command.
337 </para>
338 </sect2>
339
340 <sect2 role="configuration">
341 <title>Configuring SANE</title>
342
343 <sect3 id="sane-config">
344 <title>Config Files</title>
345
346 <para>
347 <filename>/etc/sane.d/*.conf</filename>
348 </para>
349
350 <indexterm zone="sane sane-config">
351 <primary sortas="e-etc-sane.d-conf">/etc/sane.d/*.conf</primary>
352 </indexterm>
353
354 </sect3>
355
356 <sect3>
357 <title>Configuration Information</title>
358
359 <sect4>
360 <title>Backend Configuration</title>
361
362 <para>
363 The backend configuration files are located in
364 <filename class='directory'>/etc/sane.d</filename>. Information
365 for configuring the various backends can be found by using the man(5)
366 page for the desired backend. Run
367 <command>
368 man sane-<replaceable>&lt;backend&gt;</replaceable></command>,
369 substituting the desired backend.
370 </para>
371
372 <para>
373 Add any desired users to the <systemitem
374 class="groupname">scanner</systemitem> group.
375 </para>
376
377 <para>
378 If you want to access a network scanner, include two lines in
379 <filename>net.conf</filename>, as <systemitem
380 class="username">root</systemitem> user (make sure to replace
381 &lt;server_ip&gt; by the actual value, below):
382 </para>
383
384<screen role="root"><userinput>cat &gt;&gt; /etc/sane.d/net.conf &lt;&lt; "EOF"
385<literal>connect_timeout = 60
386&lt;server_ip&gt;</literal>
387EOF</userinput></screen>
388
389 <para>
390 On the server side, include the client ip in the access list of
391 <filename>/etc/sane.d/saned.conf</filename>, restart the
392 <command>saned</command> daemon, and make sure the firewall, if any,
393 is open to the client.
394 </para>
395
396 </sect4>
397
398 <sect4>
399 <title>Frontend Configuration</title>
400 <para>
401 If you use a desktop environment like <application>Gnome</application>
402 or <application>KDE</application> you may wish to create a
403 <filename>xscanimage.desktop</filename> file so that
404 <application>xscanimage</application> appears in the panel's menus.
405 As the <systemitem class="username">root</systemitem> user:
406 </para>
407
408<screen role="root"><userinput>mkdir -pv /usr/share/{applications,pixmaps} &amp;&amp;
409
410cat &gt; /usr/share/applications/xscanimage.desktop &lt;&lt; "EOF" &amp;&amp;
411<literal>[Desktop Entry]
412Encoding=UTF-8
413Name=XScanImage - Scanning
414Comment=Acquire images from a scanner
415Exec=xscanimage
416Icon=xscanimage
417Terminal=false
418Type=Application
419Categories=Application;Graphics</literal>
420EOF
421
422ln -svf ../sane/xscanimage-icon-48x48-2.png /usr/share/pixmaps/xscanimage.png</userinput></screen>
423
424 </sect4>
425
426 <sect4>
427 <title>General Information</title>
428
429 <para>
430 For general information about configuring and using
431 <application>SANE</application>, see <command>man sane</command>.
432 For information about USB scanning devices,
433 run <command>man sane-usb</command>. For information about SCSI
434 devices, run <command>man sane-scsi</command>.
435 </para>
436
437 </sect4>
438
439 <sect4>
440 <title>Configuration and setup of the 'saned' daemon</title>
441
442 <para>
443 The <command>saned</command> daemon is not meant to be used for
444 untrusted clients. You should provide <xref linkend="fw-firewall"/>
445 protection to ensure only trusted clients access the daemon. Due to
446 the complex security requirements to ensure only trusted clients
447 access the daemon, BLFS does not provide
448 instructions to configure the <command>saned</command> daemon.
449 Some good (but outdated)
450 information for setting up and securing the <command>saned</command>
451 daemon can be found at
452 <ulink url="http://penguin-breeder.org/sane/saned/"/>.
453 </para>
454
455 </sect4>
456
457 </sect3>
458
459 </sect2>
460
461 <sect2 role="content">
462 <title>Contents</title>
463
464 <bridgehead renderas="sect4">Back Ends:</bridgehead>
465 <segmentedlist>
466 <segtitle>Installed Programs</segtitle>
467 <segtitle>Installed Libraries</segtitle>
468 <segtitle>Installed Directories</segtitle>
469
470 <seglistitem>
471 <seg>gamma4scanimage, sane-config, saned, sane-find-scanner,
472 and scanimage</seg>
473 <seg>libsane.so and numerous scanner backend modules</seg>
474 <seg>/etc/sane.d, /usr/{include,lib,share}/sane,
475 and /usr/share/doc/sane-&sane-version;</seg>
476 </seglistitem>
477 </segmentedlist>
478
479 <bridgehead renderas="sect4">Front Ends:</bridgehead>
480 <segmentedlist>
481 <segtitle>Installed Programs</segtitle>
482 <segtitle>Installed Library</segtitle>
483 <segtitle>Installed Directories</segtitle>
484
485 <seglistitem>
486 <seg>scanadf, xcam, and xscanimage</seg>
487 <seg><application>GIMP</application> plugin embedded in
488 <command>xscanimage</command></seg>
489 <seg>None</seg>
490 </seglistitem>
491 </segmentedlist>
492
493 <variablelist>
494 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
495 <?dbfo list-presentation="list"?>
496 <?dbhtml list-presentation="table"?>
497
498 <varlistentry id="gamma4scanimage">
499 <term><command>gamma4scanimage</command></term>
500 <listitem>
501 <para>
502 creates a gamma table in the format expected by
503 <command>scanimage</command>.
504 </para>
505 <indexterm zone="sane gamma4scanimage">
506 <primary sortas="b-gamma4scanimage">gamma4scanimage</primary>
507 </indexterm>
508 </listitem>
509 </varlistentry>
510
511 <varlistentry id="sane-config-prog">
512 <term><command>sane-config</command></term>
513 <listitem>
514 <para>
515 is a tool used to determine the compiler and linker
516 flags that should be used to compile and link
517 <application>SANE</application>.
518 </para>
519 <indexterm zone="sane sane-config-prog">
520 <primary sortas="b-sane-config">sane-config</primary>
521 </indexterm>
522 </listitem>
523 </varlistentry>
524
525 <varlistentry id="saned">
526 <term><command>saned</command></term>
527 <listitem>
528 <para>
529 is the <application>SANE</application> daemon that
530 allows remote clients to access image acquisition devices
531 available on the local host.
532 </para>
533 <indexterm zone="sane saned">
534 <primary sortas="b-saned">saned</primary>
535 </indexterm>
536 </listitem>
537 </varlistentry>
538
539 <varlistentry id="sane-find-scanner">
540 <term><command>sane-find-scanner</command></term>
541 <listitem>
542 <para>
543 is a command-line tool to find SCSI and
544 USB scanners and determine their device files. Its primary
545 purpose is to make sure that scanners can be detected by
546 <application>SANE</application> backends.
547 </para>
548 <indexterm zone="sane sane-find-scanner">
549 <primary sortas="b-sane-find-scanner">sane-find-scanner</primary>
550 </indexterm>
551 </listitem>
552 </varlistentry>
553
554 <varlistentry id="scanadf">
555 <term><command>scanadf</command></term>
556 <listitem>
557 <para>
558 is a command-line interface to control image acquisition
559 devices which are equipped with an automatic document feeder (ADF).
560 </para>
561 <indexterm zone="sane scanadf">
562 <primary sortas="b-scanadf">scanadf</primary>
563 </indexterm>
564 </listitem>
565 </varlistentry>
566
567 <varlistentry id="scanimage">
568 <term><command>scanimage</command></term>
569 <listitem>
570 <para>
571 is a command line interface for scanning from image acquisition
572 devices such as flatbed scanners or cameras. It is also used to
573 list the available backend devices.
574 </para>
575 <indexterm zone="sane scanimage">
576 <primary sortas="b-scanimage">scanimage</primary>
577 </indexterm>
578 </listitem>
579 </varlistentry>
580
581 <varlistentry id="xcam">
582 <term><command>xcam</command></term>
583 <listitem>
584 <para>
585 is a graphical camera front end for
586 <application>SANE</application>.
587 </para>
588 <indexterm zone="sane xcam">
589 <primary sortas="b-xcam">xcam</primary>
590 </indexterm>
591 </listitem>
592 </varlistentry>
593
594 <varlistentry id="xscanimage">
595 <term><command>xscanimage</command></term>
596 <listitem>
597 <para>
598 is a graphical user interface for scanning.
599 </para>
600 <indexterm zone="sane xscanimage">
601 <primary sortas="b-xscanimage">xscanimage</primary>
602 </indexterm>
603 </listitem>
604 </varlistentry>
605
606 <varlistentry id="libsane">
607 <term><filename class='libraryfile'>libsane.so</filename></term>
608 <listitem>
609 <para>
610 is the application programming interface that is used to
611 communicate between frontends and backends.
612 </para>
613 <indexterm zone="sane libsane">
614 <primary sortas="c-libsane">libsane.so</primary>
615 </indexterm>
616 </listitem>
617 </varlistentry>
618
619 <varlistentry id="libsane-module">
620 <term><filename class='libraryfile'>libsane-*.so</filename></term>
621 <listitem>
622 <para>
623 modules are backend scanning library plugins used to interface
624 with scanning devices. See <ulink
625 url="http://www.sane-project.org/sane-supported-devices.html"/>
626 for a list of supported backends.
627 </para>
628 <indexterm zone="sane libsane-module">
629 <primary sortas="c-libsane-module">libsane-*.so</primary>
630 </indexterm>
631 </listitem>
632 </varlistentry>
633
634 </variablelist>
635
636 </sect2>
637
638</sect1>
Note: See TracBrowser for help on using the repository browser.