[Gllug] Scanner works only as root
Daniel P. Berrange
dan at berrange.com
Fri Dec 30 17:00:30 UTC 2005
On Fri, Dec 30, 2005 at 04:06:16PM +0000, Henry Gilbert wrote:
> Any suggestions?
>
> I re-read the sane website many times and did all steps to change permissions.
> Somehow it still doesn't recognize the scanner when a user.
> But it works fine as root.
>
> root at desktop:/dev/usb# lsusb
> Bus 002 Device 002: ID 04b8:011f Seiko Epson Corp. Perfection 1670
>
> I am running Kernel 2.6.14.3
> Slackware Linux 10.2
> With hotplug switched on.
I'm not sure what the Sane website instructions say, but with Fedora Core 4
setting up my scanner with hotplug was pretty straightforward:
There is a script provided with hotplug for setting USB scanner device
permissions to be accessible by the user logged in on console called
/etc/hotplug/usb/libusbscanner. The file /etc/hotplug/usb.usermap contains
list of product and vendor ids for common scanners, mapping them to the
libusbscanner script. My scanner was not in there, so I plugged it
in & looked in /proc/bus/usb/devices to figure out its product & vendor
id & added a new entry to usb.usermap for these details.
# usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
# Nikon Coolscan V
libusbscanner 0x0003 0x04b0 0x4001 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
> Finally here is the cat of the usb devices.
> Note that the driver is not present there but I have placed the
> firmware at the right places.
> Anyway it works are root but not as user .. So I don't know what else to try.
> root at desktop:/proc/bus/usb# cat /proc/bus/usb/devices
>
> T: Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
> D: Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs= 1
> P: Vendor=04b8 ProdID=011f Rev= 1.07
> S: Manufacturer=EPSON
> S: Product=EPSON Scanner
> C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
> I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
> E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
> E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
> E: Ad=83(I) Atr=03(Int.) MxPS= 8 Ivl=16ms
From this it looks like you need to add a line to usb.usermap containing:
# EPSON Perfection 1670
libusbscanner 0x0003 0x04b8 0x011f 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00
0x00000000
With that added, hotplug ought to correctly detect it and run libusbscanner
script to set the permissions. NB not sure if the 'libusbscanner' script
is standard part of hotplug, or a Fedora addition, so it may or may not
have the same name on Debian.
Regards,
Dan.
--
|=- GPG key: http://www.berrange.com/~dan/gpgkey.txt -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- berrange at redhat.com - Daniel Berrange - dan at berrange.com -=|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20051230/de657c55/attachment.pgp>
-------------- next part --------------
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list