source: pst/scanning/sane.xml@ 7acd427

12.1 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18
Last change on this file since 7acd427 was 437f2d71, checked in by Douglas R. Reno <renodr@…>, 10 months ago

Update to sane-backends-1.2.1

  • Property mode set to 100644
File size: 21.9 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 "302159419ed1ee216c6e1edbe97c2a8c">
10 <!ENTITY sane-be-size "6.9 MB">
11 <!ENTITY sane-be-buildsize "311 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 &lfs120_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 command as the
185 &root; 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. As a result, the user building the
196 package needs to be added to the
197 <systemitem class="groupname">scanner</systemitem> group. Add the
198 user to the <systemitem class="groupname">scanner</systemitem> group
199 by issuing the following command as the &root; user:
200 </para>
201
202<screen role="root"><userinput>usermod -G scanner -a <replaceable>username</replaceable></userinput></screen>
203
204 <para>
205 After adding the <systemitem class="groupname">scanner</systemitem>
206 group as above, you will need to log out and back in to activate it.
207 </para>
208
209 </note>
210
211 <para>
212 For a USB scanner, if you are linking to <xref linkend="libusb"/>,
213 include the configure switch --enable-libusb_1_0. Install
214 <application>SANE</application>-backends by running the following
215 commands:
216 </para>
217
218<screen><userinput>sg scanner -c " \
219PYTHON=python3 ./configure --prefix=/usr \
220 --sysconfdir=/etc \
221 --localstatedir=/var \
222 --with-lockdir=/run/lock \
223 --docdir=/usr/share/doc/sane-backends-&sane-version;" &amp;&amp;
224make</userinput></screen>
225
226 <para>
227 To test the results, issue: <command>make check</command>.
228 </para>
229
230 <para>
231 Now, as the <systemitem class="username">root</systemitem> user:
232 </para>
233
234<screen role="root"><userinput>make install &amp;&amp;
235install -m 644 -v tools/udev/libsane.rules \
236 /etc/udev/rules.d/65-scanner.rules &amp;&amp;
237mkdir -p /run/lock/sane &amp;&amp;
238chgrp -v scanner /run/lock/sane</userinput></screen>
239
240 <para>
241 With the scanner on, run <command>scanimage -L</command> and the
242 name and location of the device should appear. Of course, you need the
243 device drivers configured, in order to run this test.
244 </para>
245
246 </sect3>
247
248 <sect3>
249 <title>Installation of SANE Front Ends</title>
250
251 <para>
252 The <application>SANE</application>-frontends package
253 includes the graphical frontends <command>xscanimage</command> and
254 <command>xcam</command>, and a command-line frontend
255 <command>scanadf</command>. You don't need this package if you intend
256 to use one of the more advanced graphical frontends like
257 <xref linkend="xsane"/>. For a list of frontend packages, see
258 <ulink url="http://www.sane-project.org/sane-frontends.html"/>.
259 </para>
260
261 <para>
262 To install <application>SANE</application>-frontends,
263 use the following commands:
264 </para>
265
266<screen><userinput>tar -xf ../sane-frontends-&sane-fe-version;.tar.gz &amp;&amp;
267cd sane-frontends-&sane-fe-version; &amp;&amp;
268
269sed -i -e "/SANE_CAP_ALWAYS_SETTABLE/d" src/gtkglue.c &amp;&amp;
270./configure --prefix=/usr --mandir=/usr/share/man &amp;&amp;
271make</userinput></screen>
272
273 <para>
274 This package does not come with a test suite.
275 </para>
276
277 <para>
278 Now, as the <systemitem class="username">root</systemitem> user:
279 </para>
280
281<screen role="root"><userinput>make install &amp;&amp;
282install -v -m644 doc/sane.png xscanimage-icon-48x48-2.png \
283 /usr/share/sane</userinput></screen>
284
285 <para>
286 If <application>GIMP</application> was linked into the build and
287 you wish <application>GIMP</application> to use
288 <command>xscanimage</command> as a scanning plugin, issue the following
289 command as the <systemitem class="username">root</systemitem> user:
290 </para>
291
292<screen role="root"><userinput>ln -v -s ../../../../bin/xscanimage /usr/lib/gimp/2.0/plug-ins</userinput></screen>
293
294 <note>
295 <para>
296 If the plugin <command>xscanimage</command> is disabled in
297 <application>GIMP</application>'s menu, in order to enable it,
298 "create" a blank image using the menu or Ctrl-N. After that, it is
299 enabled.
300 </para>
301 </note>
302
303 </sect3>
304
305 </sect2>
306
307 <sect2 role="commands">
308 <title>Command Explanations</title>
309
310 <para>
311 <command>sg scanner -c "..."</command>: runs the command between double
312 quotes with principal group <systemitem
313 class="groupname">scanner</systemitem>. This may be needed if the user
314 has been newly added to group scanner, and has not logged out and in.
315 </para>
316
317 <para>
318 <parameter>PYTHON=python3</parameter>: This switch forces the build
319 system to use Python 3 instead of Python 2.
320 </para>
321
322 <para>
323 <parameter>--sysconfdir=/etc</parameter>: This switch installs the
324 configuration files in <filename class="directory">/etc/sane.d</filename>
325 instead of <filename class="directory">/usr/etc/sane.d</filename>.
326 </para>
327
328<!-- This option doesn't exist anymore as of 1.2.1, and the udev rule
329 references the usage of 'scanner' everywhere.
330 <para>
331 <parameter>- -with-group=scanner</parameter>: This parameter causes
332 the directory created for the locking files to be group owned by the
333 <systemitem class="groupname">scanner</systemitem> group instead of the
334 default <systemitem class="groupname">uucp</systemitem> group.
335 </para>
336-->
337
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 users that will use a scanner 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 the &root; user (make sure to
380 replace &lt;server_ip&gt; by the actual value):
381 </para>
382
383<screen role="root"><userinput>cat &gt;&gt; /etc/sane.d/net.conf &lt;&lt; "EOF"
384<literal>connect_timeout = 60
385&lt;server_ip&gt;</literal>
386EOF</userinput></screen>
387
388 <para>
389 On the server side, include the client ip in the access list of
390 <filename>/etc/sane.d/saned.conf</filename>, restart the
391 <command>saned</command> daemon, and make sure the firewall, if any,
392 is open to the client.
393 </para>
394
395 </sect4>
396
397 <sect4>
398 <title>Frontend Configuration</title>
399 <para>
400 If you use a desktop environment like <application>GNOME</application>
401 or <application>KDE</application> you may wish to create a
402 <filename>xscanimage.desktop</filename> file so that
403 <application>xscanimage</application> appears in the panel's menus.
404 Create the desktop file using the following commands as the &root; user:
405 </para>
406
407<screen role="root"><userinput>mkdir -pv /usr/share/{applications,pixmaps} &amp;&amp;
408
409cat &gt; /usr/share/applications/xscanimage.desktop &lt;&lt; "EOF" &amp;&amp;
410<literal>[Desktop Entry]
411Encoding=UTF-8
412Name=XScanImage - Scanning
413Comment=Acquire images from a scanner
414Exec=xscanimage
415Icon=xscanimage
416Terminal=false
417Type=Application
418Categories=Application;Graphics</literal>
419EOF
420
421ln -svf ../sane/xscanimage-icon-48x48-2.png /usr/share/pixmaps/xscanimage.png</userinput></screen>
422
423 </sect4>
424
425 <sect4>
426 <title>General Information</title>
427
428 <para>
429 For general information about configuring and using
430 <application>SANE</application>, see <command>man sane</command>.
431 For information about USB scanning devices,
432 run <command>man sane-usb</command>. For information about SCSI
433 devices, run <command>man sane-scsi</command>.
434 </para>
435
436 </sect4>
437
438 <sect4>
439 <title>Configuration and setup of the 'saned' daemon</title>
440
441 <para>
442 The <command>saned</command> daemon is not meant to be used for
443 untrusted clients. You should provide <xref linkend="fw-firewall"/>
444 protection to ensure only trusted clients access the daemon. Due to
445 the complex security requirements to ensure only trusted clients
446 access the daemon, BLFS does not provide
447 instructions to configure the <command>saned</command> daemon.
448 Some good (but outdated)
449 information for setting up and securing the <command>saned</command>
450 daemon can be found at
451 <ulink url="https://penguin-breeder.org/sane/saned/"/>.
452 </para>
453
454 </sect4>
455
456 </sect3>
457
458 </sect2>
459
460 <sect2 role="content">
461 <title>Contents</title>
462
463 <bridgehead renderas="sect4">Back Ends:</bridgehead>
464 <segmentedlist>
465 <segtitle>Installed Programs</segtitle>
466 <segtitle>Installed Libraries</segtitle>
467 <segtitle>Installed Directories</segtitle>
468
469 <seglistitem>
470 <seg>gamma4scanimage,
471 sane-config,
472 saned,
473 sane-find-scanner,
474 scanimage, and
475 umax_pp</seg>
476 <seg>libsane.so and numerous scanner backend modules</seg>
477 <seg>/etc/sane.d,
478 /usr/{include,lib,share}/sane,
479 and /usr/share/doc/sane-&sane-version;</seg>
480 </seglistitem>
481 </segmentedlist>
482
483 <bridgehead renderas="sect4">Front Ends:</bridgehead>
484 <segmentedlist>
485 <segtitle>Installed Programs</segtitle>
486 <segtitle>Installed Library</segtitle>
487 <segtitle>Installed Directories</segtitle>
488
489 <seglistitem>
490 <seg>scanadf,
491 xcam, and
492 xscanimage</seg>
493 <seg><application>GIMP</application> plugin embedded in
494 <command>xscanimage</command></seg>
495 <seg>None</seg>
496 </seglistitem>
497 </segmentedlist>
498
499 <variablelist>
500 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
501 <?dbfo list-presentation="list"?>
502 <?dbhtml list-presentation="table"?>
503
504 <varlistentry id="gamma4scanimage">
505 <term><command>gamma4scanimage</command></term>
506 <listitem>
507 <para>
508 creates a gamma table in the format expected by
509 <command>scanimage</command>
510 </para>
511 <indexterm zone="sane gamma4scanimage">
512 <primary sortas="b-gamma4scanimage">gamma4scanimage</primary>
513 </indexterm>
514 </listitem>
515 </varlistentry>
516
517 <varlistentry id="sane-config-prog">
518 <term><command>sane-config</command></term>
519 <listitem>
520 <para>
521 is a tool used to determine the compiler and linker
522 flags that should be used to compile and link
523 <application>SANE</application>
524 </para>
525 <indexterm zone="sane sane-config-prog">
526 <primary sortas="b-sane-config">sane-config</primary>
527 </indexterm>
528 </listitem>
529 </varlistentry>
530
531 <varlistentry id="saned">
532 <term><command>saned</command></term>
533 <listitem>
534 <para>
535 is the <application>SANE</application> daemon that
536 allows remote clients to access image acquisition devices
537 available on the local host
538 </para>
539 <indexterm zone="sane saned">
540 <primary sortas="b-saned">saned</primary>
541 </indexterm>
542 </listitem>
543 </varlistentry>
544
545 <varlistentry id="sane-find-scanner">
546 <term><command>sane-find-scanner</command></term>
547 <listitem>
548 <para>
549 is a command-line tool to find SCSI and
550 USB scanners and determine their device files. Its primary
551 purpose is to make sure that scanners can be detected by
552 <application>SANE</application> backends
553 </para>
554 <indexterm zone="sane sane-find-scanner">
555 <primary sortas="b-sane-find-scanner">sane-find-scanner</primary>
556 </indexterm>
557 </listitem>
558 </varlistentry>
559
560 <varlistentry id="scanadf">
561 <term><command>scanadf</command></term>
562 <listitem>
563 <para>
564 is a command-line interface to control image acquisition
565 devices which are equipped with an automatic document feeder (ADF)
566 </para>
567 <indexterm zone="sane scanadf">
568 <primary sortas="b-scanadf">scanadf</primary>
569 </indexterm>
570 </listitem>
571 </varlistentry>
572
573 <varlistentry id="scanimage">
574 <term><command>scanimage</command></term>
575 <listitem>
576 <para>
577 is a command line interface for scanning from image acquisition
578 devices such as flatbed scanners or cameras. It is also used to
579 list the available backend devices
580 </para>
581 <indexterm zone="sane scanimage">
582 <primary sortas="b-scanimage">scanimage</primary>
583 </indexterm>
584 </listitem>
585 </varlistentry>
586
587 <varlistentry id="umax_pp">
588 <term><command>umax_pp</command></term>
589 <listitem>
590 <para>
591 is a tool used to read information from UMAX parallel port
592 scanners. It can also be used for performing diagnostics on these
593 scanners
594 </para>
595 <indexterm zone="sane umax_pp">
596 <primary sortas="b-umax_pp">umax_pp</primary>
597 </indexterm>
598 </listitem>
599 </varlistentry>
600
601 <varlistentry id="xcam">
602 <term><command>xcam</command></term>
603 <listitem>
604 <para>
605 is a graphical camera front end for
606 <application>SANE</application>
607 </para>
608 <indexterm zone="sane xcam">
609 <primary sortas="b-xcam">xcam</primary>
610 </indexterm>
611 </listitem>
612 </varlistentry>
613
614 <varlistentry id="xscanimage">
615 <term><command>xscanimage</command></term>
616 <listitem>
617 <para>
618 is a graphical user interface for scanning
619 </para>
620 <indexterm zone="sane xscanimage">
621 <primary sortas="b-xscanimage">xscanimage</primary>
622 </indexterm>
623 </listitem>
624 </varlistentry>
625
626 <varlistentry id="libsane">
627 <term><filename class="libraryfile">libsane.so</filename></term>
628 <listitem>
629 <para>
630 is the application programming interface that is used to
631 communicate between frontends and backends
632 </para>
633 <indexterm zone="sane libsane">
634 <primary sortas="c-libsane">libsane.so</primary>
635 </indexterm>
636 </listitem>
637 </varlistentry>
638
639 <varlistentry id="libsane-module">
640 <term><filename class="libraryfile">libsane-*.so</filename></term>
641 <listitem>
642 <para>
643 modules are backend scanning library plugins used to interface
644 with scanning devices. See
645 <ulink url="http://www.sane-project.org/sane-supported-devices.html"/>
646 for a list of supported backends
647 </para>
648 <indexterm zone="sane libsane-module">
649 <primary sortas="c-libsane-module">libsane-*.so</primary>
650 </indexterm>
651 </listitem>
652 </varlistentry>
653
654 </variablelist>
655
656 </sect2>
657
658</sect1>
Note: See TracBrowser for help on using the repository browser.