Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I try to scan, using simple-scan, the UI says Failed to scan -- Unable to connect to scanner. When I run it from the command line I get:

joel@home:/usr/bin$ simple-scan -d
** (simple-scan:6554): DEBUG: Starting Simple Scan 2.32.0.1, PID=6554
** (simple-scan:6554): DEBUG: Restoring window to 600x400 pixels
** (simple-scan:6554): DEBUG: sane_init () -> SANE_STATUS_GOOD
** (simple-scan:6554): DEBUG: SANE version 1.0.22
** (simple-scan:6554): DEBUG: Requesting redetection of scan devices
** (simple-scan:6554): DEBUG: Processing request
** (simple-scan:6554): DEBUG: Requesting scan at 300 dpi from device '(null)'
** (simple-scan:6554): DEBUG: scanner_scan ("(null)", 300, SCAN_SINGLE)
** (simple-scan:6554): DEBUG: sane_get_devices () -> SANE_STATUS_GOOD
** (simple-scan:6554): DEBUG: Device: name="brother2:bus4;dev1" vendor="Brother" model="MFC-210C" type="USB scanner"
** (simple-scan:6554): DEBUG: Processing request
** (simple-scan:6554): DEBUG: sane_open ("brother2:bus4;dev1") -> SANE_STATUS_IO_ERROR

** (simple-scan:6554): WARNING **: Unable to get open device: Error during device I/O

FYI, I have already done:

joel@home:~$ sudo chmod a+rwx /dev/bus/usb
joel@home:~$ sudo chmod a+rwx /dev/bus/usb/*

If I run under sudo:

joel@home:~$ sudo simple-scan

it works.

How can I get simple-scan to work without sudo?

share|improve this question
add comment

4 Answers

up vote 3 down vote accepted

Chances are that saned doesn't think you're allowed to connect to it. See the Permissions Issues section of the Ubuntu Scanning Howto for details.

share|improve this answer
    
See my answer below for full details of what I did. –  JoelFan Jun 17 '11 at 11:55
    
Seems that all user accounts aren't added to the scanner group. I used sudo adduser username scanner and then you need to log off and back in again for the group membership to be noticed by the OS. –  KayEss Aug 1 '13 at 3:03
add comment

I had a similar problem (Ubuntu 11.04 - Natty Narwhal): Scanning as root works fine, scanning as user – no go. scanimage -L and sane-find-scanner found and identified the the scanner correctly, even when run as normal user. `simple-scan -d both as root and normal user didn't show up anything useful in terms of missing group right, missing files or drivers.

Eventually this link worked for me.

The solution was editing these files:

  • /lib/udev/rules.d/40-libsane.rules
  • /etc/udev/rules.d/55-libsane.rules

Not sure if both needed to be edited, I applied all changes as described. Very important: REBOOT after editing.

share|improve this answer
add comment

I solved it by adding this line to /etc/rc.local (before exit 0):

chmod -R a+w /dev/bus/usb

and editing/creating the following 2 files:

/etc/xinetd.d/saned:

service saned 
{
socket_type = stream
server = /usr/sbin/saned
protocol = tcp
user = root
group = root
wait = no
disable = no
}

/etc/default/saned:

# Defaults for the saned initscript, from sane-utils

# Set to yes to start saned
RUN=yes

# Set to the user saned should run as
RUN_AS_USER=root

then rebooting.

It's working, but I still would like a more secure way of solving this.

share|improve this answer
add comment

Edit the following:

/etc/default/saned

And change the:

RUN_AS_USER=saned

to

RUN_AS_USER=root

Restart and test again – this should be working.

share|improve this answer
    
Something tells me this is not a desirable solution from a security standpoint. –  Kazark Apr 12 at 1:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.