source: pst/scanning/sane.xml@ bf3b3e6d

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 bf3b3e6d was d0caf17a, checked in by Bruce Dubbs <bdubbs@…>, 17 months ago

Still more tags

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