source: pst/scanning/sane.xml@ 14891a90

12.0 12.1 kea ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 14891a90 was 14891a90, checked in by Xi Ruoyao <xry111@…>, 11 months ago

treewide: More "User Notes" clean up

Remove links to pages w/o real contents.

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