|
Lines 1461-1467
Link Here
|
| 1461 |
<programlisting>device usb |
1461 |
<programlisting>device usb |
| 1462 |
device uhci |
1462 |
device uhci |
| 1463 |
device ohci |
1463 |
device ohci |
| 1464 |
device ehci</programlisting> |
1464 |
device ehci |
|
|
1465 |
device xhci</programlisting> |
| 1465 |
|
1466 |
|
| 1466 |
<para>To determine if the <acronym>USB</acronym> scanner is |
1467 |
<para>To determine if the <acronym>USB</acronym> scanner is |
| 1467 |
detected, plug it in and use <command>dmesg</command> to |
1468 |
detected, plug it in and use <command>dmesg</command> to |
|
Lines 1524-1552
Link Here
|
| 1524 |
<sect2> |
1525 |
<sect2> |
| 1525 |
<title><application>SANE</application> Configuration</title> |
1526 |
<title><application>SANE</application> Configuration</title> |
| 1526 |
|
1527 |
|
| 1527 |
<para>The <application>SANE</application> system is split in two |
1528 |
<para>The <application>SANE</application> system provides the |
| 1528 |
parts: the backends |
1529 |
access to the scanner via backends (<package>graphics/sane-backends</package>). |
| 1529 |
(<package>graphics/sane-backends</package>) and the frontends |
1530 |
Refer to <link |
| 1530 |
(<package>graphics/sane-frontends</package> or |
|
|
| 1531 |
<package>graphics/xsane</package>). The backends provide |
| 1532 |
access to the scanner. Refer to <link |
| 1533 |
xlink:href="http://www.sane-project.org/sane-supported-devices.html">http://www.sane-project.org/sane-supported-devices.html</link> |
1531 |
xlink:href="http://www.sane-project.org/sane-supported-devices.html">http://www.sane-project.org/sane-supported-devices.html</link> |
| 1534 |
to determine which backend supports the scanner. The |
1532 |
to determine which backend supports the scanner. A |
| 1535 |
frontends provide the graphical scanning interface. |
1533 |
graphical scanning interface is provided by third party |
| 1536 |
<package>graphics/sane-frontends</package> installs |
1534 |
applications like <application>Kooka</application> |
| 1537 |
<application>xscanimage</application> while |
1535 |
(<package>graphics/kooka</package>) or |
| 1538 |
<package>graphics/xsane</package> installs |
1536 |
<application>XSane</application> |
| 1539 |
<application>xsane</application>.</para> |
1537 |
(<package>graphics/xsane</package>). |
|
|
1538 |
<application>SANE</application>'s backends are enough to test |
| 1539 |
the scanner.</para> |
| 1540 |
|
1540 |
|
| 1541 |
<para>To install the two parts from binary packages:</para> |
1541 |
<para>To install the backends from binary package:</para> |
| 1542 |
|
1542 |
|
| 1543 |
<screen>&prompt.root; <userinput>pkg install xsane sane-frontends</userinput></screen> |
1543 |
<screen>&prompt.root; <userinput>pkg install sane-backends</userinput></screen> |
| 1544 |
|
1544 |
|
| 1545 |
<para>Alternatively, to install from the Ports Collection</para> |
1545 |
<para>Alternatively, to install from the Ports Collection</para> |
| 1546 |
|
1546 |
|
| 1547 |
<screen>&prompt.root; <userinput>cd /usr/ports/graphics/sane-frontends</userinput> |
1547 |
<screen>&prompt.root; <userinput>cd /usr/ports/graphics/sane-backends</userinput> |
| 1548 |
&prompt.root; <userinput>make install clean</userinput> |
|
|
| 1549 |
&prompt.root; <userinput>cd /usr/ports/graphics/xsane</userinput> |
| 1550 |
&prompt.root; <userinput>make install clean</userinput></screen> |
1548 |
&prompt.root; <userinput>make install clean</userinput></screen> |
| 1551 |
|
1549 |
|
| 1552 |
<para>After installing the |
1550 |
<para>After installing the |
|
Lines 1579-1590
Link Here
|
| 1579 |
<screen>&prompt.root; <userinput>scanimage -L</userinput> |
1577 |
<screen>&prompt.root; <userinput>scanimage -L</userinput> |
| 1580 |
device `snapscan:/dev/pass3' is a AGFA SNAPSCAN 600 flatbed scanner |
1578 |
device `snapscan:/dev/pass3' is a AGFA SNAPSCAN 600 flatbed scanner |
| 1581 |
&prompt.root; <userinput>scanimage -L</userinput> |
1579 |
&prompt.root; <userinput>scanimage -L</userinput> |
| 1582 |
device 'epson2:libusb:/dev/usb:/dev/ugen0.2' is a Epson GT-8200 flatbed scanner</screen> |
1580 |
device 'epson2:libusb:000:002' is a Epson GT-8200 flatbed scanner</screen> |
| 1583 |
|
1581 |
|
| 1584 |
<para>In this second example, |
1582 |
<para>In this second example, |
| 1585 |
<literal>'epson2:libusb:/dev/usb:/dev/ugen0.2'</literal> is |
1583 |
<literal>epson2</literal> is |
| 1586 |
the backend name (<literal>epson2</literal>) and |
1584 |
the backend name and |
| 1587 |
<literal>/dev/ugen0.2</literal> is the device node used by the |
1585 |
<literal>libusb:000:002</literal> means |
|
|
1586 |
<filename>/dev/ugen0.2</filename> is the device node used by the |
| 1588 |
scanner.</para> |
1587 |
scanner.</para> |
| 1589 |
|
1588 |
|
| 1590 |
<para>If <command>scanimage</command> is unable to identify the |
1589 |
<para>If <command>scanimage</command> is unable to identify the |
|
Lines 1612-1618
Link Here
|
| 1612 |
with the right backend name and the device node:</para> |
1611 |
with the right backend name and the device node:</para> |
| 1613 |
|
1612 |
|
| 1614 |
<screen>&prompt.root; <userinput>scanimage -L</userinput> |
1613 |
<screen>&prompt.root; <userinput>scanimage -L</userinput> |
| 1615 |
device 'epson2:libusb:/dev/usb:/dev/ugen0.2' is a Epson GT-8200 flatbed scanner</screen> |
1614 |
device 'epson2:libusb:000:002' is a Epson GT-8200 flatbed scanner</screen> |
| 1616 |
|
1615 |
|
| 1617 |
<para>Once <command>scanimage -L</command> sees the scanner, the |
1616 |
<para>Once <command>scanimage -L</command> sees the scanner, the |
| 1618 |
configuration is complete and the scanner is now ready to |
1617 |
configuration is complete and the scanner is now ready to |
|
Lines 1621-1636
Link Here
|
| 1621 |
<para>While <command>scanimage</command> can be used to perform |
1620 |
<para>While <command>scanimage</command> can be used to perform |
| 1622 |
an image acquisition from the command line, it is often |
1621 |
an image acquisition from the command line, it is often |
| 1623 |
preferable to use a graphical interface to perform image |
1622 |
preferable to use a graphical interface to perform image |
| 1624 |
scanning. The <package>graphics/sane-frontends</package> |
1623 |
scanning. Applications like <application>Kooka</application> |
| 1625 |
package or port installs a simple but efficient graphical |
1624 |
or <application>XSane</application> are popular scanning |
| 1626 |
interface, <application>xscanimage</application>.</para> |
1625 |
frontends. They |
| 1627 |
|
1626 |
offer advanced features such as various scanning modes, color |
| 1628 |
<para>Alternately, <application>xsane</application>, which is |
1627 |
correction, and batch scans. <application>XSane</application> |
| 1629 |
installed with the <package>graphics/xsane</package> package |
1628 |
is also usable as a <application>GIMP</application> plugin.</para> |
| 1630 |
or port, is another popular graphical scanning frontend. It |
|
|
| 1631 |
offers advanced features such as various scanning modes, color |
| 1632 |
correction, and batch scans. Both of these applications are |
| 1633 |
usable as a <application>GIMP</application> plugin.</para> |
| 1634 |
</sect2> |
1629 |
</sect2> |
| 1635 |
|
1630 |
|
| 1636 |
<sect2> |
1631 |
<sect2> |
|
Lines 1637-1644
Link Here
|
| 1637 |
<title>Scanner Permissions</title> |
1632 |
<title>Scanner Permissions</title> |
| 1638 |
|
1633 |
|
| 1639 |
<para>In order to have access to the scanner, a user needs read |
1634 |
<para>In order to have access to the scanner, a user needs read |
| 1640 |
and write permissions to the device node used by the scanner. |
1635 |
and write permissions to the device node used by the |
| 1641 |
In the previous example, the <acronym>USB</acronym> scanner |
1636 |
scanner. There are several ways to give the user the |
|
|
1637 |
permissions.</para> |
| 1638 |
|
| 1639 |
<sect3> |
| 1640 |
<title>Using &man.devfs.8;</title> |
| 1641 |
|
| 1642 |
<para>In the previous example, the <acronym>USB</acronym> scanner |
| 1642 |
uses the device node <filename>/dev/ugen0.2</filename> which |
1643 |
uses the device node <filename>/dev/ugen0.2</filename> which |
| 1643 |
is really a symlink to the real device node |
1644 |
is really a symlink to the real device node |
| 1644 |
<filename>/dev/usb/0.2.0</filename>. The symlink and the |
1645 |
<filename>/dev/usb/0.2.0</filename>. The symlink and the |
|
Lines 1668-1673
Link Here
|
| 1668 |
add path ugen0.2 mode 0660 group usb |
1669 |
add path ugen0.2 mode 0660 group usb |
| 1669 |
add path usb/0.2.0 mode 0666 group usb</programlisting> |
1670 |
add path usb/0.2.0 mode 0666 group usb</programlisting> |
| 1670 |
|
1671 |
|
|
|
1672 |
<note> |
| 1673 |
<para>It happens the device node changes with the addition or |
| 1674 |
removal of devices, so one may want to give access to all |
| 1675 |
USB devices using these ruleset instead:</para> |
| 1676 |
|
| 1677 |
<programlisting>[system=5] |
| 1678 |
add path 'ugen*' mode 0660 group usb |
| 1679 |
add path 'usb/*' mode 0666 group usb</programlisting> |
| 1680 |
</note> |
| 1681 |
|
| 1682 |
<para>Refer to &man.devfs.rules.5; for more information about |
| 1683 |
this file.</para> |
| 1684 |
|
| 1685 |
<para>Next, enable the ruleset in /etc/rc.conf:</para> |
| 1686 |
|
| 1687 |
<programlisting>devfs_system_ruleset="system"</programlisting> |
| 1688 |
|
| 1689 |
<para>And, restart the &man.devfs.8; system:</para> |
| 1690 |
|
| 1691 |
<screen>&prompt.root; <userinput>service devfs restart</userinput></screen> |
| 1692 |
|
| 1671 |
<para>Finally, add the users to <systemitem |
1693 |
<para>Finally, add the users to <systemitem |
| 1672 |
class="groupname"><replaceable>usb</replaceable></systemitem> |
1694 |
class="groupname"><replaceable>usb</replaceable></systemitem> |
| 1673 |
in order to allow access to the scanner:</para> |
1695 |
in order to allow access to the scanner:</para> |
|
Lines 1675-1680
Link Here
|
| 1675 |
<screen>&prompt.root; <userinput>pw groupmod usb -m <replaceable>joe</replaceable></userinput></screen> |
1697 |
<screen>&prompt.root; <userinput>pw groupmod usb -m <replaceable>joe</replaceable></userinput></screen> |
| 1676 |
|
1698 |
|
| 1677 |
<para>For more details refer to &man.pw.8;.</para> |
1699 |
<para>For more details refer to &man.pw.8;.</para> |
|
|
1700 |
</sect3> |
| 1701 |
|
| 1702 |
<sect3> |
| 1703 |
<title>Using the Device State Change Daemon |
| 1704 |
(&man.devd.8;)</title> |
| 1705 |
|
| 1706 |
<para>To be written...</para> |
| 1707 |
|
| 1708 |
</sect3> |
| 1678 |
</sect2> |
1709 |
</sect2> |
| 1679 |
</sect1> |
1710 |
</sect1> |
| 1680 |
</chapter> |
1711 |
</chapter> |