Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jul 2005 21:03:33 +0200
From:      Marc Fonvieille <blackend@freebsd.org>
To:        Erik =?iso-8859-1?B?TsO4cmdhYXJk?= <norgaard@math.ku.dk>
Cc:        questions@freebsd.org
Subject:   Re: SOLVED: scanimage -L doesn't work as normal user
Message-ID:  <20050730190333.GA614@nosferatu.blackend.org>
In-Reply-To: <Pine.LNX.4.40.0507301910480.17064-100000@shannon.math.ku.dk>
References:  <20050730141302.GD596@gothic.blackend.org> <Pine.LNX.4.40.0507301910480.17064-100000@shannon.math.ku.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jul 30, 2005 at 07:54:36PM +0200, Erik Nørgaard wrote:
> Hi,
> 
> OK, I have solved the problem, as was originally assumed it boils
> down to getting the permissions right.
> 
> To make Epson 2480 work, there is no need to patch the uscanner.c
> or usbdevs files and rebuild that module. I did make that work
> though - sort of, now, sane-find-scanner finds an unidentified
> device on uscanner0, but scanimage correctly idenfies the scanner.
> 
> This is what to do: In /usr/src/sys/dev/usb edit the files usbdevs
> and uscanner.c, in usbdevs add a line:
> 
>   product EPSON 2480              0x0121  Perfection 2480 scanner
> 
> and in uscanner.c add the line
> 
>    {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_2480 }, 0 },
> 
> after the last EPSON scanner.

Please submit a PR with these both lines.

> 
> I don't know if there is any benefit from using the uscanner
> device other than the ability to set permissions for the scanner
> only.
> 

Using uscanner(4) is "the FreeBSD way", ugen(4) is for USB devices
without specific driver.
For example you can remove "device ugen" from your kernel config and
your scanner will continue to run...

> Here's the trick:
> 
> Create a file /etc/devfs.rules with the following:
> 
>   [devfsrules=10]
>   # Allow any user to access usb devices: uscanner and ugen
>   add path 'usb0'      mode 0666
>   add path 'usb1'      mode 0666
>   add path 'ugen*'     mode 0666

These 3 lines are useless since you're using uscanner, sane-find-scanner
or scanimage should only mention uscanner not ugen, etc. now.

>   add path 'uscanner*' mode 0666
> 
> The last line can be omitted if you don't use the uscanner device.
> I think it is better to let "others" access rw the scanner device
> than to add users to the operator group.
> 

You have to use uscanner(4), period :)

Marc



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050730190333.GA614>