source: pst/scanning/sane.xml@ cdb3add2

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.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 cdb3add2 was 46c5976, checked in by Pierre Labastie <pieere@…>, 5 years ago

sane-backends: the user running configure really need to belong to the scanner
group. Reintroduce the note about that, and use "sg" for configure

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

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