$OpenBSD: README,v 1.16 2018/11/18 15:52:18 ajacoutot Exp $

+-----------------------------------------------------------------------
| Running sane-backends on OpenBSD
+-----------------------------------------------------------------------

First read /usr/local/share/doc/sane-backends/PROBLEMS.

USB
===
Since USB scanning will be handled by libusb, you need to allow the
_saned user access to the corresponding USB endpoint. To do so, find
where your scanner is attached to using:
    $ usbdevs -v
then change the ownerships accordingly.

e.g.                                                                            
Controller /dev/usb0:                                                           
<...>                                                                           
addr 05: 03f0:4812 HP, Officejet 7500 E910                                      
         high speed, self powered, config 1, rev 1.00, iSerialNumber MY2793100Q05JB
         driver: umass0                                                         
         driver: ugen1                                                          
                                                                                
# chgrp _saned /dev/ugen1.* /dev/usb0

The reason we are changing the group and not the user is that it will
allow for multi-function devices to work for both printing and scanning
(e.g. by being owned by _cups:_saned).

To preserve your changes after a system update, use rc.local(8).
e.g. for a multi-function printer/scanner add the following lines:
chown _cups:_saned /dev/ugen1.* /dev/usb0

Alternatively, hotplugd(8) attach/detach scripts can automate this.

You can then grant users direct access to the scanner by adding them to
the _saned group.

SCSI
====
SANE only supports the generic SCSI uk(4) devices.
Make sure your user account has access to the scanner device node or you
will not be able to scan.

LOCKING
=======
Some backends (like sane-plustek(5)) use a lockfile for allowing
multiple access to one scanner. If using such a backend, you must
add yourself to the _saned group or you will not be able to scan.

NETWORK
=======
By default, the saned(8) daemon runs as _saned, so you need to allow the
_saned user access to the scanner device node.
