[NTLUG:Discuss] Scanners on SuSE 11.0 -- do they work?

Stephen Davidson gorky at freenet.carleton.ca
Tue Feb 3 10:17:02 CST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Terry.

For convenience, my response is top posted this time.

Installed packages;
blue:/etc/udev/rules.d # rpm -qa |grep sane
sane-frontends-1.0.14-250.1
sane-backends-autoconfig-1.0.19-48.1
sane-backends-1.0.19-48.1
blue:/etc/udev/rules.d # rpm -qa |grep xsane
blue:/etc/udev/rules.d #

So I guess the backend & command lines are installed, but the X-Frontend
is not.  No files current have group ownership scanner.


Clean/fresh install.  I literally just installed the OS, so no previous
installs were in place.
Output of
grep sane /etc/udev/rules.d/55-libsane.rules |grep scanner
grep sane /etc/udev/rules.d/55-libsane.rules |grep GROUP
is;
blue:/etc/udev/rules.d # grep sane /etc/udev/rules.d/55-libsane.rules
|grep scanner
blue:/etc/udev/rules.d # grep sane /etc/udev/rules.d/55-libsane.rules
|grep GROUP
SYSFS{idVendor}=="03f0", SYSFS{idProduct}=="0000", MODE="0664",
GROUP="lp", ENV{libsane_matched}="yes"
SYSFS{idVendor}=="03f0", SYSFS{idProduct}=="0011", MODE="0664",
GROUP="lp", ENV{libsane_matched}="yes"
SYSFS{idVendor}=="03f0", SYSFS{idProduct}=="0101", MODE="0664",
GROUP="lp", ENV{libsane_matched}="yes"

Only the group "lp" is used here (note: no users are members of group lp).

Scanner is device 002:003.
blue:/etc/udev/rules.d # ls -l /dev/bus/usb/002/003
crw-rw-r--+ 1 root lp 189, 130 Feb  2 17:27 /dev/bus/usb/002/003
Have never seen the '+' in permissions before, what does that mean?

At this point, I am thinking that we have some issues with the udev
rules.  They seem to be setting the Scanner to group 'lp', rather than
scanner?  And I am not sure that's right.  And then there seems to be
something going on with;
1) User logged into system via Desktop Console getting assigned to
whatever group owns the USB
2) The USB devices are not actually getting mounted until the Desktop
user logs in.

I am beginning to think I have TWO problems here, not one.

Solution for scanner, should I be changing the group on that rules file
from 'lp' to 'scanner'?

Regards,
Steve


terry wrote:
> On Mon, Feb 2, 2009 at 11:04 PM, Stephen Davidson <gorky at freenet.carleton.ca
>> wrote:
> 
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> terry wrote:
>>> On Sun, Feb 1, 2009 at 12:54 PM, Stephen Davidson <
>> gorky at freenet.carleton.ca
>>>> wrote:
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA1
>>>>
>>>> Greetings.
>>>>
>>>> Any ideas how to get one to work?  My first issue;
>>>>
>>>> steve at blue:~>  scanimage -L
>>>>
>>>> No scanners were identified. If you were expecting something different,
>>>> check that the scanner is plugged in, turned on and detected by the
>>>> sane-find-scanner tool (if appropriate). Please read the documentation
>>>> which came with this software (README, FAQ, manpages).
>>>> steve at blue:~>
>>>>
>>>> blue:~ # scanimage -L
>>>> device `genesys:libusb:002:010' is a Canon LiDE 35/40/50 flatbed scanner
>>>> blue:~ #
>>>>
>>>> Note that I can't get Gimp or Kooka to react to the scanner as well when
>>>> logged in as a normal user.  If you click Configure on kooka, or Select
>>>> Scanner on Gimp, nothing happens.  No error messages, nothing.  On a
>>>> hunch, I restarted Gimp from the command line, and had the scanimage
>>>> message from "steve at blue" displayed in the console.  So I think if I
>> can
>>>> fix the issue with Scanimage, I might be able to get Gimp to use the
>>>> scanner.  I have not tried either software when logged in as root.
>>>>
>>>> So, does this mean I can only do scanning if I am root?  That does not
>>>> seem right....
>>>>
>>>> Suggestions?
>>>>
>>> Yes, it is possible that only root is privvilidged enough to use the
>>> scanner, (but I would not use it as root).  TO find out if that is the
>>> problem:
>>>
>>> In the terminal issue the command:
>>> grep scanner /etc/group
>>>
>>> If you do not see your user name listed there, then edit that line in the
>>> file /etc/group and add your user name to the end of the line.
>>>
>>> For instance, if your user name is steve and the line says:
>>> scanner:x:93:
>>> change it so that it says
>>> scanner:x:93:steve
>>>
>>> If it already has a user name on the line, place a comma and space after
>> it
>>> first, like so:
>>>
>>> scanner:x:93:fred,steve
>>>
>>> Once the you have your name added to group "scanner"  log out and log
>> back
>>> in again and you should have permission to use the scanner.
>>>
>>>
>> I found this link when googling, but I have not yet succeeded in the goal;
>> http://www.linux.com/articles/57798
>>
>> There was initially no scanner group for anyone to be a member of.  I
>> had to manually create one.  But I have not changed any file permissions
>> or ownerships.  Should I?  If so, which ones?  Is whatever process that
>> is responsible for mounting the USB devices (HAL?) not setting the
>> device permissions correctly?
> 
> 
> If sane / xsnae  is installed  most of this stuff should have already been
> done.
> 
> There should be a number of files that should have group ownership scanner,
> but I think they are just symbolic links and that should have been done for
> you or should have been done already, (if sane is installed), and I'm not
> sure why it wasn't in your case. Maybe your system is different, I doubt it,
> but with slackware, if your user is  in the group scanner, it just works and
> that's it.
> 
> So see that sane and xsane are installed and are current / up-to-date
> versions.
> 
> rpm -qa |grep sane
> rpm -qa |grep xsane
> 
> Other than that, I'm not sure what the problem would be.
> 
> 
> 
>> Following the readme from the above link, I found several SANE files in
>> /etc/udev/rules.d.  After looking through them, I have found the
>> following lines in;
>> /etc/udev/rules.d/55-libsane.rules
> 
> 
> You should find numerous lines in your 55-libsane.rules that indicate that
> each scanner that is supported will be available to  group  scanner
> 
> See what you see in the output of:
> 
>  grep sane /etc/udev/rules.d/55-libsane.rules |grep scanner
> 
> or
> 
>  grep sane /etc/udev/rules.d/55-libsane.rules |grep GROUP
> 
> 
> 
>> ACTION!="add", GOTO="libsane_rules_end"
>> ENV{DEVTYPE}=="usb_device", GOTO="libsane_create_usb_dev"
>> SUBSYSTEM=="usb", GOTO="libsane_rules_begin"
>> SUBSYSTEM=="usb_device", GOTO="libsane_rules_begin"
>> SUBSYSTEM!="usb_device", GOTO="libsane_rules_end"
>>
>> # Kernel >= 2.6.22 jumps here
>> LABEL="libsane_create_usb_dev"
>>
>> # For Linux >= 2.6.22 without CONFIG_USB_DEVICE_CLASS=y
>> # If the following rule does not exist on your system yet, uncomment it
>> # ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}",
>> MODE="0664", OWNER="root", GROUP="root"
>>
> 
> These above lines are commented out, must be from old, previous
> configurations, but showing only root ownership and no group other than
> root, so I'm not sure what that is about, but I assume that the installation
> of sane or xsane would check for and confirm proper udev configuration, but
> that may not be the case.
> 
> 
> 
>> ...
>>
>> # Canon CanoScan LiDE 35 | Canon CanoScan LiDE 40 | Canon CanoScan LiDE 50
>> SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="2213", MODE="0664",
>> GROUP="lp", ENV{libsane_matched}="yes"
>>
>> I suspect that something here is causing the issue, but not sure how or
>> what.  The line setting the usb_device owner to root/root seems to be
>> commented out, and there does not seem to be anything setting its owner
>> to the currently logged in user.
>>
>> Ideas?
>>
>>
> Yes, maybe one.  See that you are in plugdev group.
> 
>   grep plugdev /etc/group
> 
> (But if you weren't in the plugdev group, you wouldn't be able to use any
> usb device, so...)
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFJiG3+SphIUSiVzgYRAu2PAKCwomynkgya95c2pGK9XEkwTIGkcgCffU/B
rzHsY8g+lFuLIdhou2IHTG0=
=5W+A
-----END PGP SIGNATURE-----



More information about the Discuss mailing list