From owner-freebsd-questions@FreeBSD.ORG Sat Jul 30 19:11:31 2005 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A49216A41F for ; Sat, 30 Jul 2005 19:11:31 +0000 (GMT) (envelope-from marc@blackend.org) Received: from abigail.blackend.org (blackend.org [212.11.35.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id 61A6743D6D for ; Sat, 30 Jul 2005 19:11:24 +0000 (GMT) (envelope-from marc@blackend.org) Received: from nosferatu.blackend.org (nosferatu.blackend.org [192.168.1.205]) by abigail.blackend.org (8.13.3/8.13.3) with ESMTP id j6UJBNtn026830; Sat, 30 Jul 2005 21:11:23 +0200 (CEST) (envelope-from marc@abigail.blackend.org) Received: from nosferatu.blackend.org (localhost.blackend.org [127.0.0.1]) by nosferatu.blackend.org (8.13.3/8.13.1) with ESMTP id j6UJBO0L000800; Sat, 30 Jul 2005 21:11:24 +0200 (CEST) (envelope-from marc@nosferatu.blackend.org) Received: (from marc@localhost) by nosferatu.blackend.org (8.13.3/8.13.1/Submit) id j6UJ3Yll000731; Sat, 30 Jul 2005 21:03:34 +0200 (CEST) (envelope-from marc) Date: Sat, 30 Jul 2005 21:03:33 +0200 From: Marc Fonvieille To: Erik =?iso-8859-1?B?TsO4cmdhYXJk?= Message-ID: <20050730190333.GA614@nosferatu.blackend.org> References: <20050730141302.GD596@gothic.blackend.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Useless-Header: blackend.org X-Operating-System: FreeBSD 5.4-STABLE Cc: questions@freebsd.org Subject: Re: SOLVED: scanimage -L doesn't work as normal user X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2005 19:11:31 -0000 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