Fedora Linux Support Community & Resources Center
  #1  
Old 2007-07-25, 03:30 PM CDT
wneumann Offline
Registered User
 
Join Date: Dec 2004
Posts: 502
xsane can only find scanner as root

Xsane was working fine until a recent update (I don't know what update hurt it, updated too much since I last used the scanner).

Xsane and scanimage can only find the scanner as root. Xsane gives dire warnings about the danger of running it as root.

I found advice to do "chmod 664 /proc/bus/usb/001/005" (my scanner is on Bus 001 Device 005)
but that didn't help xsane (it did help scanimage).

If I go whole hog with "chmod 666 /proc/bus/usb/001/005", then xsane is fine. Does anyone know a reason why not to do this?
Reply With Quote
  #2  
Old 2007-07-27, 05:11 AM CDT
marsmutant Offline
Registered User
 
Join Date: Jul 2007
Posts: 2
Hello wneumann,

I've got a problem that looks very similar to yours. After updating my system via "yum update" my scanner (Mustek ScanExpress 1200 UB Plus) is "out of order".
If I boot my system with the previous kernel (2.6.21-1.3228), the scanner works as usual. I think the new kernel (2.6.22.1-27) has some problems to create the necessary devices in /dev. The previous kernel (2.6.21-1.3228) creates some files in /dev (e.g. /dev/scanner-..., /dev/bus/usb/001/003 (the usb-port where my scanner is plugged in)).
Perhaps the "brandnew" kernel (2.6.22.1-33) released at 27-Jul-2007 04:39 is the solution ?? I'll try it at the weekend.
Reply With Quote
  #3  
Old 2007-07-29, 03:33 PM CDT
wneumann Offline
Registered User
 
Join Date: Dec 2004
Posts: 502
I have same setup on a different machine and don't have the problem there. I don't know why. Anyway, on the machine that has problems I've written a script "chmod-scanner" that gets run automatically from a login file:

Code:
#!/bin/sh

canon=`sudo /sbin/lsusb |grep Canon`
bus=`echo $canon| sed -e s/Bus\ // -e s/\ Device.\*//`
device=`echo $canon| sed -e s/Bus.\*Device\ // -e s/\:.\*//`
sudo chmod 666 /proc/bus/usb/$bus/$device
It does the trick. If your scanner isn't a Canon do lsusb to find a convenient other word to search for to grab the scanner line.
Reply With Quote
  #4  
Old 2007-07-30, 01:56 AM CDT
marsmutant Offline
Registered User
 
Join Date: Jul 2007
Posts: 2
OK, this is a workaround that will fix the problem (like many other possible workarounds e.g. "chmod 666 /proc/bus/usb/00x/00y" in "/etc/rc.d/rc.local" if your device is always attached to the same USB-port (xy), ...). But the main problem is a kernel bug. After updating my kernel from version 2.6.22.1-27 to 2.6.22.1-33 my scanner works again without any additional actions.
By the way, with version 2.6.22.1-33 I had a problem with one of my USB-Sticks (recognized as device sdb1, but no automount). All my other devices (USB-HD, MP3-Player, USB-Camera, some USB-Sticks) were running without problems. So, up to the next kernel release I will use the kernel 2.6.21-1.3228. With it I can use all my USB-devices without any manual configuration.
Reply With Quote
  #5  
Old 2007-11-29, 11:35 AM CST
gastonv Offline
Registered User
 
Join Date: Nov 2006
Posts: 59
Hello,
I have a similar problem with a LifeTec LT9350 (Mustek 1200CP clone) scanner.
In the past I could start xsane without root, but from beginning september I only can start it in root.
The result is that the scanned files will be stored as root root, and that I can not see or use them as user
Code:
[gastonv@pandora1 ~]$ ls -l out0002.png
-rwxrwxrwx 1 root root 12657 nov 29 18:43 out0002.png
Some config files:
[code][gastonv@pandora1 ~]$ cat /etc/sane.d/dll.conf
...
mustek_pp
...
[code]
and:
Code:
[gastonv@pandora1 ~]$ cat /etc/sane.d/mustek_pp.conf
...
# Example for a LifeTec LT9350 (Mustek 1200CP clone):
    scanner LT9350 * cis1200
    option top_adjust 0
    option bw 127
I am working in Fedora Core 6.
Code:
[gastonv@pandora1 ~]$ uname -a
Linux pandora1 2.6.22.9-61.fc6 #1 SMP Thu Sep 27 18:48:03 EDT 2007 i686 athlon i386 GNU/Linux
Please what can be the reason why xsane doesn't work any more without root?
Many thanks in advance for helping,
Gaston Verhulst

Last edited by gastonv; 2007-11-29 at 11:36 PM CST.
Reply With Quote
  #6  
Old 2007-12-02, 07:04 PM CST
pitonyak Offline
Registered User
 
Join Date: Dec 2004
Location: Columbus, Ohio, USA
Posts: 46
Quote:
Originally Posted by wneumann
I have same setup on a different machine and don't have the problem there. I don't know why. Anyway, on the machine that has problems I've written a script "chmod-scanner" that gets run automatically from a login file:

Code:
#!/bin/sh

canon=`sudo /sbin/lsusb |grep Canon`
bus=`echo $canon| sed -e s/Bus\ // -e s/\ Device.\*//`
device=`echo $canon| sed -e s/Bus.\*Device\ // -e s/\:.\*//`
sudo chmod 666 /proc/bus/usb/$bus/$device
It does the trick. If your scanner isn't a Canon do lsusb to find a convenient other word to search for to grab the scanner line.
I liked your code so much, that I stole it...

Code:
#!/bin/sh

# Set scanner vendor and product code as returned by lsusb.
scandevice=04b8:0122

scanner=`sudo /sbin/lsusb -d $scandevice`
bus=`echo $scanner| sed -e s/Bus\ // -e s/\ Device.\*//`
device=`echo $scanner| sed -e s/Bus.\*Device\ // -e s/\:.\*//`
if [ "$bus" = "" ] | [ "$device" = "" ]
then
  echo "Unable to find scanner with vendor:product = $scandevice"
  exit 1
fi
sudo chmod 666 /proc/bus/usb/$bus/$device
echo "Set access for $scandevice at /proc/bus/usb/$bus/$device"
This code uses the vendor and product ID as returned by lsusb. There should be no problem with multiple devices unless they are the same device type (as in two scanners of the same type). I figured that if I was going to steal the code, I needed to give back.

Last edited by pitonyak; 2007-12-02 at 07:05 PM CST. Reason: The code I pasted had extra new lines...
Reply With Quote
  #7  
Old 2010-06-16, 10:06 AM CDT
incident41 Offline
Registered User
 
Join Date: May 2010
Posts: 4
linuxfedorafirefox
Re: xsane can only find scanner as root

Lovely, this still works for my HP All-In-One c4680 printer/scanner under Fedora 13.

Thanks !

--alessandro
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FC9 xsane now will not detect scanner miles General Support 5 2008-06-10 06:59 AM CDT
xsane does not talk to my scanner on F7 :( 105547111 Software 4 2007-06-14 12:21 PM CDT
artec 48+U scanner & xsane hbrhodes gmane.linux.redhat.fedora.general 8 2006-03-20 05:50 PM CST
USB: sane / xsane backend for my scanner ? t3gah Hardware 10 2005-03-19 01:40 PM CST
Scanner seen but Xsane does not support it. Mac gmane.linux.redhat.fedora.general 1 2004-06-14 04:15 AM CDT

Translations (Powered by Powered by Google):
Afrikaans Albanian Arabic Belarusian Bulgarian Catalan Chinese Croatian Czech Danish Dutch English Estonian Filipino Finnish French Galician German Greek Hebrew Hindi Hungarian Icelandic Indonesian Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Taiwanese Thai Turkish Ukrainian Vietnamese Yiddish

All times are GMT -7. The time now is 07:02 PM CDT.

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo



All trademarks, and forum posts in this site are property of their respective owner(s).

FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Rules | Archive | Contact | Founding Members
Designed By Ewdison Then | Powered by vBulletin ©2000-2010, Jelsoft Enterprises Ltd.
FedoraForum is Powered by Open Source Projects and Products
vB Enterprise Translator (vBET 2.3.10) coded by NLP-er