SOLVED: scanimage -L doesn't work as normal user

Marc Fonvieille blackend at freebsd.org
Sat Jul 30 19:11:31 GMT 2005


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


More information about the freebsd-questions mailing list