How to use sane/xsane for all users?

Issues related to applications and software problems
Post Reply
User avatar
centocub
Posts: 65
Joined: 2015/08/20 08:09:53

How to use sane/xsane for all users?

Post by centocub » 2015/11/05 19:48:01

Hi,

I am using Centos 7 and a Brother DCP-135C USB printer/scanner. Printing is fine for all users, scanning with Xsane is fine, too, but only for root (beesu xsane)!

I would like to make scanning accessible for all users. Despite much searching and Goggleing I am at my wits' end. How could I make xsane accesssible for all users?

Some commands I tried were:

Code: Select all

$ scanimage -L
device `brother2:bus2;dev3' is a Brother DCP-135C USB scanner
device `v4l:/dev/video0' is a Noname WebCam SC-13HDL11939N virtual device

Code: Select all

$ sudo sane-find-scanner
  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04f9, product=0x01ce) at libusb:002:012
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.

Code: Select all

$ lsusb
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 045e:0797 Microsoft Corp. Optical Mouse 200
Bus 001 Device 004: ID 2232:1029 Silicon Motion WebCam SC-13HDL11939N
Bus 002 Device 012: ID 04f9:01ce Brother Industries, Ltd DCP-135C
Bus 002 Device 003: ID 0cf3:3004 Atheros Communications, Inc. AR3012 Bluetooth 4
scanimage -L says my scanner is at bus2 device3, sane-find-scanner and lsusb put it at bus 2 device12; I am confused, let alone how I could use this information to configure sane/xsane to work with all users.

Any help would be greatly appreciated.

Thank you,

centocub

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: How to use sane/xsane for all users?

Post by aks » 2015/11/06 16:56:17

I would have thought making all users as members of whomever group-owns the device under /dev would work.

User avatar
centocub
Posts: 65
Joined: 2015/08/20 08:09:53

Re: How to use sane/xsane for all users?

Post by centocub » 2015/11/07 11:40:13

aks wrote:I would have thought making all users as members of whomever group-owns the device under /dev would work.
Unfortunately not, see viewtopic.php?f=19&t=17721&start=10

In this thread both
TrevorH wrote:
and
ToddAndMargo wrote:
that one should edit a file

Code: Select all

/etc/udev/rules.d/60-libsane.rules
However, this directoy is empty in my case, nothing in /etc/udev/rules.d". Also, I cannot find anywhere in "/" and all subdirectories a file with "libsane.rules" in its name, especially not in /lib/udev/rules.d" :(

Maybe TrevorH or ToddAndMango know something about it?

User avatar
centocub
Posts: 65
Joined: 2015/08/20 08:09:53

[SOLVED]

Post by centocub » 2015/11/07 17:17:58

Since there was nothing to edit I created the file from scratch, using some bits and pieces I found in the net:

Code: Select all

/etc/udev/rules.d/60-libsane.rules:

LABEL="libsane_usb_rules_begin"
# missing lines apparently not important
# Brother DCP-135C
ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="01ce", ENV{libsane_matched}="yes"
# missing lines apparently not importatn
LABEL="libsane_usb_rules_end"
Success :)

Post Reply