source: pst/scanning/sane.xml@ 4d6023d2

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 4d6023d2 was 4d6023d2, checked in by Fernando de Oliveira <fernando@…>, 11 years ago

Tag xsane for lfs73_checked, add xscanimage.desktop, add a note for xscanimage

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

  • Property mode set to 100644
File size: 20.7 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://alioth.debian.org/frs/?group_id=30186"> -->
8 <!ENTITY sane-be-download-http " ">
9 <!ENTITY sane-be-download-ftp "ftp://ftp2.sane-project.org/pub/sane/sane-backends-&sane-version;.tar.gz">
10 <!--<!ENTITY sane-be-download-ftp "&gentoo-ftp-repo;/sane-backends-&sane-version;.tar.gz">-->
11 <!ENTITY sane-be-md5sum "979c9dbb23920d04e322be23122c7de7">
12 <!ENTITY sane-be-size "5.1 MB">
13 <!ENTITY sane-be-buildsize "120 MB">
14 <!ENTITY sane-be-time "1.2 SBU">
15
16 <!ENTITY sane-fe-download-http "http://alioth.debian.org/frs/download.php/file/1140/sane-frontends-&sane-fe-version;.tar.gz">
17 <!ENTITY sane-fe-download-ftp "ftp://ftp2.sane-project.org/pub/sane/sane-frontends-&sane-fe-version;.tar.gz">
18 <!ENTITY sane-fe-md5sum "c63bf7b0bb5f530cf3c08715db721cd3">
19 <!ENTITY sane-fe-size "231 KB">
20 <!ENTITY sane-fe-buildsize "3.0 MB">
21 <!ENTITY sane-fe-time "less than 0.1 SBU">
22]>
23
24<sect1 id="sane" xreflabel="SANE-&sane-version;">
25 <?dbhtml filename="sane.html"?>
26
27 <sect1info>
28 <othername>$LastChangedBy$</othername>
29 <date>$Date$</date>
30 </sect1info>
31
32 <title>SANE-&sane-version;</title>
33
34 <indexterm zone="sane">
35 <primary sortas="a-SANE">SANE</primary>
36 </indexterm>
37
38 <sect2 role="package">
39 <title>Introduction to SANE</title>
40
41 <para><application>SANE</application> is short for Scanner Access Now Easy.
42 Scanner access; however, is far from easy, since every vendor has their own
43 protocols. The only known protocol that should bring some unity into this
44 chaos is the TWAIN interface, but this is too imprecise to allow a stable
45 scanning framework. Therefore, <application>SANE</application> comes with
46 its own protocol, and the vendor drivers can't be used.</para>
47
48 <para><application>SANE</application> is split into back ends and front
49 ends. The back ends are drivers for the supported scanners and cameras. The
50 front ends are user interfaces to access the backends.</para>
51
52 &lfs73_checked;
53
54 <!-- This note is not applicable. First, there is no issue downloading the
55 ftp://ftp2.sane-project.org/pub/sane/sane-backends-1.0.23.tar.gz
56 tarball with wget. Next, the combined tarball exists on the SANE FTP
57 site, but the MD5sum is wrong. We can simply point the download to
58 the SANE FTP site and create our own MD5sum (as we do on many packages).
59
60 <note><para>The upstream web site uses a self signed security
61 certificate. If using <command>wget</command>, the option -no-check-certificate
62 needs to be added.</para>
63
64 <para>The md5sum of the backend file does not match unless the three parts
65 of the divided tarball on the upstream server,
66 sane-backends-1.0.23.tar.gz.[1-3], are combined. A combined tarball with
67 the correct md5sum is located at <ulink
68 url="http://anduin.linuxfromscratch.org/sources/other/sane-backends-1.0.23.tar.gz">http://anduin.linuxfromscratch.org/sources/other/sane-backends-1.0.23.tar.gz</ulink>.</para></note>
69 -->
70
71 <bridgehead renderas="sect3">Back Ends Package Information</bridgehead>
72 <itemizedlist spacing='compact'>
73 <listitem>
74 <para>Download (HTTP): <ulink url="&sane-be-download-http;"/></para>
75 </listitem>
76 <listitem>
77 <para>Download (FTP): <ulink url="&sane-be-download-ftp;"/></para>
78 </listitem>
79 <listitem>
80 <para>Download MD5 sum: &sane-be-md5sum;</para>
81 </listitem>
82 <listitem>
83 <para>Download size: &sane-be-size;</para>
84 </listitem>
85 <listitem>
86 <para>Estimated disk space required: &sane-be-buildsize;</para>
87 </listitem>
88 <listitem>
89 <para>Estimated build time: &sane-be-time;</para>
90 </listitem>
91 </itemizedlist>
92
93 <bridgehead renderas="sect3">Front Ends Package Information</bridgehead>
94 <itemizedlist spacing='compact'>
95 <listitem>
96 <para>Download (HTTP): <ulink url="&sane-fe-download-http;"/></para>
97 </listitem>
98 <listitem>
99 <para>Download (FTP): <ulink url="&sane-fe-download-ftp;"/></para>
100 </listitem>
101 <listitem>
102 <para>Downlaod MD5 sum: &sane-fe-md5sum;</para>
103 </listitem>
104 <listitem>
105 <para>Download size: &sane-fe-size;</para>
106 </listitem>
107 <listitem>
108 <para>Estimated disk space required: &sane-fe-buildsize;</para>
109 </listitem>
110 <listitem>
111 <para>Estimated build time: &sane-fe-time;</para>
112 </listitem>
113 </itemizedlist>
114<!--
115 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
116 <itemizedlist spacing="compact">
117 <listitem>
118 <para>Required patch:
119 <ulink url="&patch-root;/sane-backends-&sane-version;-v4l-1.patch"/>
120 </para>
121 </listitem>
122 </itemizedlist>
123-->
124 <bridgehead renderas="sect3">SANE Dependencies</bridgehead>
125
126 <bridgehead renderas="sect4">Optional (Back Ends)</bridgehead>
127 <para role="optional">
128 <xref linkend="avahi"/>,
129 <xref linkend="cups"/>,
130 <xref linkend="libjpeg"/>,
131 <xref linkend="libtiff"/>,
132 <xref linkend="libusb"/>,
133 <ulink url="http://www.net-snmp.org/">Net-SNMP</ulink>,
134 <ulink url="http://cyberelk.net/tim/libieee1284/">libieee1284</ulink>,
135 <ulink url="http://www.gphoto.org/">libgphoto2</ulink>,
136 <ulink url="http://linuxtv.org/downloads/v4l-utils/">Video4Linux</ulink>, and
137 <xref linkend="texlive"/>
138 </para>
139
140 <bridgehead renderas="sect4">Optional (Front Ends)</bridgehead>
141 <para role="optional">
142 <xref linkend="x-window-system"/>,
143 <xref linkend="gtk2"/>, and
144 <xref linkend="gimp"/>
145 </para>
146
147 <para condition="html" role="usernotes">User Notes:
148 <ulink url="&blfs-wiki;/sane"/></para>
149
150 </sect2>
151
152 <sect2 role="kernel" id='sane-kernel'>
153 <title>Kernel Configuration</title>
154
155 <indexterm zone="sane sane-kernel">
156 <primary sortas="d-Scanning-devices">Scanning devices</primary>
157 </indexterm>
158
159 <para>To access your scanner, you will probably need the related kernel
160 drivers and/or additional support packages. A SCSI scanner will need SCSI
161 drivers, a parallel port scanner needs parallel port support (you should
162 use enhanced EPP modes) and perhaps <ulink
163 url="http://cyberelk.net/tim/libieee1284/">libieee1284</ulink>, and a USB
164 scanner will need the <xref linkend="libusb"/> package. Ensure you have
165 the necessary drivers properly configured to access the devices.</para>
166
167 </sect2>
168
169 <sect2 role="installation">
170 <title>Installation of SANE</title>
171
172 <sect3>
173 <title>Installation of SANE Back Ends</title>
174
175 <note>
176 <para>
177 You may safely disregard any messages printed on the screen when you
178 unpack the tarball.
179 </para>
180 </note>
181
182 <para>The <application>SANE</application> daemon should run with its own
183 group. Create this group by issuing the following commands as the
184 <systemitem class="username">root</systemitem> user:</para>
185
186<screen><userinput>groupadd -g 70 scanner</userinput></screen>
187
188 <note>
189 <para>
190 The user building <application>SANE</application>-backends should be
191 a member of the <systemitem class="groupname">scanner</systemitem>
192 group before proceeding. After you have added the user building the
193 package to the <systemitem class="groupname">scanner</systemitem>
194 group, issue the following command to create a new shell:
195 </para>
196
197<screen><userinput>su $(whoami)</userinput></screen>
198
199 <para>
200 Check the output of the <userinput>groups</userinput> command and
201 ensure the user is a member of the
202 <systemitem class="groupname">scanner</systemitem> group.
203 </para>
204 </note>
205
206 <para>Install <application>SANE</application>-backends by
207 running the following commands:</para>
208
209 <!-- Not sure why this was there as it works if TeX is installed
210 and it doesn't try to use it if TeX is not installed
211 -disable-latex &amp;&amp; -->
212
213<screen><userinput>./configure --prefix=/usr \
214 --sysconfdir=/etc \
215 --localstatedir=/var \
216 --with-docdir=/usr/share/doc/sane-backend-1.0.23 \
217 --with-group=scanner &amp;&amp;
218make &amp;&amp;
219exit</userinput></screen>
220
221 <para>To test the results, issue: <command>make check</command>.</para>
222
223 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
224
225<screen role="root"><userinput>make install &amp;&amp;
226install -m 644 -v tools/udev/libsane.rules \
227 /etc/udev/rules.d/65-scanner.rules &amp;&amp;
228chgrp -v scanner /var/lock/sane</userinput></screen>
229
230 </sect3>
231
232 <sect3>
233 <title>Installation of SANE Front Ends</title>
234
235 <para>The <application>SANE</application>-frontends package
236 includes the graphical frontends <command>xscanimage</command> and
237 <command>xcam</command>, and a command-line frontend
238 <command>scanadf</command>. You don't need this package if you intend
239 to use one of the more advanced graphical frontends like
240 <xref linkend="xsane"/>. For a list of frontend packages, see
241 <ulink url="http://www.sane-project.org/sane-frontends.html"/>.</para>
242
243 <para>To install <application>SANE</application>-frontends,
244 use the following commands:</para>
245
246<screen><userinput>sed -i -e "/SANE_CAP_ALWAYS_SETTABLE/d" src/gtkglue.c &amp;&amp;
247./configure --prefix=/usr &amp;&amp;
248make</userinput></screen>
249
250 <para>This package does not come with a test suite.</para>
251
252 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
253
254<screen role="root"><userinput>make install &amp;&amp;
255install -v -m644 doc/sane.png xscanimage-icon-48x48-2.png \
256 /usr/share/sane</userinput></screen>
257
258 <para>If <application>GIMP</application> was linked into the build and
259 you wish <application>GIMP</application> to use
260 <command>xscanimage</command> as a scanning plugin, issue the following
261 command as the <systemitem class="username">root</systemitem> user:</para>
262
263<screen role="root"><userinput>ln -v -s ../../../../bin/xscanimage /usr/lib/gimp/2.0/plug-ins</userinput></screen>
264
265 <note>
266 <para>
267 If the plugin xscanimage is disabled in GIMP's menu, in order to
268 enable it, "create" a blank image using the menu or Ctrl-N. After
269 that, it is enabled.
270 </para>
271 </note>
272
273 </sect3>
274
275 </sect2>
276
277 <sect2 role="commands">
278 <title>Command Explanations</title>
279
280 <para><parameter>--sysconfdir=/etc</parameter>: This switch installs the
281 configuration files in <filename class="directory">/etc/sane.d</filename>
282 instead of <filename class="directory">/usr/etc/sane.d</filename>.</para>
283
284 <para><parameter>--with-group=scanner</parameter>: This parameter causes
285 the directory created for the locking files to be group owned by the
286 <systemitem class="groupname">scanner</systemitem> group instead of the
287 default <systemitem class="groupname">uucp</systemitem> group.</para>
288
289 <para><command>exit</command>: This command is used to exit the shell
290 created by the <command>su</command> command.</para>
291 </sect2>
292
293 <sect2 role="configuration">
294 <title>Configuring SANE</title>
295
296 <sect3 id="sane-config">
297 <title>Config Files</title>
298
299 <para><filename>/etc/sane.d/*.conf</filename></para>
300
301 <indexterm zone="sane sane-config">
302 <primary sortas="e-etc-sane.d-conf">/etc/sane.d/*.conf</primary>
303 </indexterm>
304
305 </sect3>
306
307 <sect3>
308 <title>Configuration Information</title>
309
310 <sect4>
311 <title>Backend Configuration</title>
312
313 <para>The backend configuration files are located in
314 <filename class='directory'>/etc/sane.d</filename>. Information
315 for configuring the various backends can be found by using the man(5)
316 page for the desired backend. Run
317 <command>man sane-<replaceable>&lt;backend&gt;</replaceable></command>,
318 substituting the desired backend.</para>
319
320 <para>Add any desired users to the <systemitem
321 class="groupname">scanner</systemitem> group.</para>
322
323 </sect4>
324
325 <sect4>
326 <title>Frontend Configuration</title>
327 <para>
328 If you use a desktop environment like <application>Gnome</application>
329 or <application>KDE</application> you may wish to create a
330 <filename>xscanimage.desktop</filename> file so that
331 <application>xscanimage</application> appears in the panel's menus.
332 As the <systemitem class="username">root</systemitem> user:
333 </para>
334
335<screen role="root"><userinput>mkdir -pv /usr/share/{applications,pixmaps} &amp;&amp;
336
337cat &gt; /usr/share/applications/xscanimage.desktop &lt;&lt; "EOF" &amp;&amp;
338[Desktop Entry]
339Encoding=UTF-8
340Name=XScanImage - Scanning
341Comment=Acquire images from a scanner
342Exec=xscanimage
343Icon=xscanimage
344Terminal=false
345Type=Application
346Categories=Application;Graphics
347EOF
348
349ln -svf ../sane/xscanimage-icon-48x48-2.png /usr/share/pixmaps/xscanimage.png</userinput></screen>
350
351 </sect4>
352
353 <sect4>
354 <title>General Information</title>
355
356 <para>For general information about configuring and using
357 <application>SANE</application>, see <command>man sane</command>.
358 Linux-2.6.x brings some special issues into the picture. See
359 <ulink url="http://www.sane-project.org/README.linux"/> for
360 information about using <application>SANE</application> with the
361 Linux-2.6.x kernel. For information about USB scanning devices,
362 run <command>man sane-usb</command>. For information about SCSI
363 devices, run <command>man sane-scsi</command>.</para>
364
365 </sect4>
366
367 <sect4>
368 <title>Configuration and setup of the 'saned' daemon</title>
369
370 <para>The <command>saned</command> daemon is not meant to be used for
371 untrusted clients. You should provide <xref linkend="fw-firewall"/>
372 protection to ensure only trusted
373 clients access the daemon. Due to the complex security requirements to
374 ensure only trusted clients access the daemon, BLFS does not provide
375 instructions to configure the <command>saned</command> daemon. If you
376 desire to make the daemon available, ensure you provide adequate
377 security, configure your <filename>[x]inetd.conf</filename> file and
378 send a <userinput>SIGHUP</userinput> to the [x]inetd daemon. Some good
379 information for setting up and securing the <command>saned</command>
380 daemon can be found at
381 <ulink url="http://penguin-breeder.org/sane/saned/"/>.</para>
382
383 </sect4>
384
385 </sect3>
386
387 </sect2>
388
389 <sect2 role="content">
390 <title>Contents</title>
391
392 <bridgehead renderas="sect4">Back Ends:</bridgehead>
393 <segmentedlist>
394 <segtitle>Installed Programs</segtitle>
395 <segtitle>Installed Libraries</segtitle>
396 <segtitle>Installed Directories</segtitle>
397
398 <seglistitem>
399 <seg>gamma4scanimage, sane-config, saned, sane-find-scanner,
400 and scanimage</seg>
401 <seg>libsane.so and numerous scanner backend modules</seg>
402 <seg>/etc/sane.d, /usr/include/sane, /usr/lib/sane, /usr/share/sane,
403 and /usr/share/doc/sane-&sane-version;</seg>
404 </seglistitem>
405 </segmentedlist>
406
407 <bridgehead renderas="sect4">Front Ends:</bridgehead>
408 <segmentedlist>
409 <segtitle>Installed Programs</segtitle>
410 <segtitle>Installed Library</segtitle>
411 <segtitle>Installed Directories</segtitle>
412
413 <seglistitem>
414 <seg>scanadf, xcam, and xscanimage</seg>
415 <seg><application>GIMP</application> plugin embedded in
416 <command>xscanimage</command></seg>
417 <seg>None</seg>
418 </seglistitem>
419 </segmentedlist>
420
421 <variablelist>
422 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
423 <?dbfo list-presentation="list"?>
424 <?dbhtml list-presentation="table"?>
425
426 <varlistentry id="gamma4scanimage">
427 <term><command>gamma4scanimage</command></term>
428 <listitem>
429 <para>creates a gamma table in the format expected by
430 <command>scanimage</command>.</para>
431 <indexterm zone="sane gamma4scanimage">
432 <primary sortas="b-gamma4scanimage">gamma4scanimage</primary>
433 </indexterm>
434 </listitem>
435 </varlistentry>
436
437 <varlistentry id="sane-config-prog">
438 <term><command>sane-config</command></term>
439 <listitem>
440 <para>is a tool used to determine the compiler and linker
441 flags that should be used to compile and link
442 <application>SANE</application>.</para>
443 <indexterm zone="sane sane-config-prog">
444 <primary sortas="b-sane-config">sane-config</primary>
445 </indexterm>
446 </listitem>
447 </varlistentry>
448
449 <varlistentry id="saned">
450 <term><command>saned</command></term>
451 <listitem>
452 <para>is the <application>SANE</application> daemon that
453 allows remote clients to access image acquisition devices
454 available on the local host.</para>
455 <indexterm zone="sane saned">
456 <primary sortas="b-saned">saned</primary>
457 </indexterm>
458 </listitem>
459 </varlistentry>
460
461 <varlistentry id="sane-find-scanner">
462 <term><command>sane-find-scanner</command></term>
463 <listitem>
464 <para>is a command-line tool to find SCSI and
465 USB scanners and determine their device files. Its primary
466 purpose is to make sure that scanners can be detected by
467 <application>SANE</application> backends.</para>
468 <indexterm zone="sane sane-find-scanner">
469 <primary sortas="b-sane-find-scanner">sane-find-scanner</primary>
470 </indexterm>
471 </listitem>
472 </varlistentry>
473
474 <varlistentry id="scanadf">
475 <term><command>scanadf</command></term>
476 <listitem>
477 <para>is a command-line interface to control image acquisition
478 devices which are equipped with an automatic document feeder
479 (ADF).</para>
480 <indexterm zone="sane scanadf">
481 <primary sortas="b-scanadf">scanadf</primary>
482 </indexterm>
483 </listitem>
484 </varlistentry>
485
486 <varlistentry id="scanimage">
487 <term><command>scanimage</command></term>
488 <listitem>
489 <para>is a command line interface for scanning from image acquisition
490 devices such as flatbed scanners or cameras. It is also used to list
491 the available backend devices.</para>
492 <indexterm zone="sane scanimage">
493 <primary sortas="b-scanimage">scanimage</primary>
494 </indexterm>
495 </listitem>
496 </varlistentry>
497
498 <varlistentry id="xcam">
499 <term><command>xcam</command></term>
500 <listitem>
501 <para>is a graphical camera front end for
502 <application>SANE</application>.</para>
503 <indexterm zone="sane xcam">
504 <primary sortas="b-xcam">xcam</primary>
505 </indexterm>
506 </listitem>
507 </varlistentry>
508
509 <varlistentry id="xscanimage">
510 <term><command>xscanimage</command></term>
511 <listitem>
512 <para>is a graphical user interface for scanning.</para>
513 <indexterm zone="sane xscanimage">
514 <primary sortas="b-xscanimage">xscanimage</primary>
515 </indexterm>
516 </listitem>
517 </varlistentry>
518
519 <varlistentry id="libsane">
520 <term><filename class='libraryfile'>libsane.so</filename></term>
521 <listitem>
522 <para>is the application programming interface that is used to
523 communicate between frontends and backends.</para>
524 <indexterm zone="sane libsane">
525 <primary sortas="c-libsane">libsane.so</primary>
526 </indexterm>
527 </listitem>
528 </varlistentry>
529
530 <varlistentry id="libsane-module">
531 <term><filename class='libraryfile'>libsane-*.so</filename></term>
532 <listitem>
533 <para>modules are backend scanning library plugins used to interface
534 with scanning devices. See
535 <ulink url="http://www.sane-project.org/sane-supported-devices.html"/>
536 for a list of supported backends.</para>
537 <indexterm zone="sane libsane-module">
538 <primary sortas="c-libsane-module">libsane-*.so</primary>
539 </indexterm>
540 </listitem>
541 </varlistentry>
542
543 </variablelist>
544
545 </sect2>
546
547</sect1>
Note: See TracBrowser for help on using the repository browser.