Date: Sat, 30 Jul 2005 19:54:36 +0200 (CEST) From: =?ISO-8859-1?Q?Erik_N=C3=B8rgaard?= <norgaard@math.ku.dk> To: Marc Fonvieille <blackend@freebsd.org> Cc: questions@freebsd.org Subject: SOLVED: scanimage -L doesn't work as normal user Message-ID: <Pine.LNX.4.40.0507301910480.17064-100000@shannon.math.ku.dk> In-Reply-To: <20050730141302.GD596@gothic.blackend.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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. 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. 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 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. Alternatively, one can create a separate group eg "scanner", then append "group scanner" to each rule - this might be the best instead of giving rw access to arbitrary ugen devices. In /etc/rc.conf add the line: devfs_system_ruleset="devfsrules" Then restart devfs. You can unplug and plugin the scanner as much as you like. Cheers, Erik GnuPG: http://www.locolomo.org/home/norgaard/norgaard.gpg.asc pub 1024D/11D11F9E 2003-08-15 Erik Norgaard <norgaard@locolomo.org> Key fingerprint = C394 81C4 D137 EEE5 39BE 82D5 3E6B FB3E 11D1 1F9E
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.40.0507301910480.17064-100000>