From owner-freebsd-questions@FreeBSD.ORG Thu Aug 4 04:16:41 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17DFE106564A for ; Thu, 4 Aug 2011 04:16:41 +0000 (UTC) (envelope-from olivares14031@gmail.com) Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx1.freebsd.org (Postfix) with ESMTP id D7AE78FC08 for ; Thu, 4 Aug 2011 04:16:40 +0000 (UTC) Received: by iye7 with SMTP id 7so2824274iye.17 for ; Wed, 03 Aug 2011 21:16:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=xg+Y/+B67CIrQZ7n7Ddonx7ASe8mDcLVRJHMUVXDJ0U=; b=cJgEj+pTIbc6elAevSvbbxnXuoD3TfNGhoMOTto745PdzALn5RBqBJZLtc78Zx+b63 sq1hW/R6QfzA1Adk5gEF+7rhKJYQBQrbO1ZWgvlEPbJmsci/pKEyH1m68GEVKvFdO9kE ETjUaCKeFJPRTMddUV/ODMB+gMsfWakq3XT0I= MIME-Version: 1.0 Received: by 10.43.134.133 with SMTP id ic5mr298448icc.293.1312431400214; Wed, 03 Aug 2011 21:16:40 -0700 (PDT) Received: by 10.42.165.200 with HTTP; Wed, 3 Aug 2011 21:16:39 -0700 (PDT) In-Reply-To: References: Date: Wed, 3 Aug 2011 23:16:39 -0500 Message-ID: From: Antonio Olivares To: Warren Block Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Questions Subject: Re: help setup an HP 3300C scanner 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: Thu, 04 Aug 2011 04:16:41 -0000 Warren, On Wed, Aug 3, 2011 at 10:48 PM, Warren Block wrote: > On Wed, 3 Aug 2011, Antonio Olivares wrote: > >> This as root though, but as simple user cannot do much :(, again xsane >> tells me that no devices were found :( >> >> Suggestions/Advice/comments are welcome and appreciated. > > To hit some relevant points... > > The uscanner device is gone, no longer needed with FreeBSD-8. > > devfs.conf hasn't been effective for dynamic devices for me. =A0Copying t= he > clever technique from sysutils/scanbuttond/pkg-message.in, I use devd.con= f > to detect the scanner attach and detach devices and change permissions an= d > do whatever else is necessary. =A0Scanner users are a member of the saned > group. > > # WB > # detect Epson Perfection 1640SU scanner and start scanbuttond > attach 20 { > =A0 =A0 =A0 =A0device-name "ugen[0-9].[0-9]"; > =A0 =A0 =A0 =A0match "vendor" "0x04b8"; > =A0 =A0 =A0 =A0match "product" "0x010a"; > =A0 =A0 =A0 =A0action "usb_devaddr=3D`echo $device-name | sed 's#^ugen##'= ` && \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0chown root:saned /dev/usb/${usb_devaddr}.*= && \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0chmod 0660 /dev/usb/${usb_devaddr}.* && \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0su saned -c '/usr/local/bin/scanbuttond \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-s /usr/local/etc/scanbuttond/buttonpresse= d.sh \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-S /usr/local/etc/scanbuttond/initscanner.= sh \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-b /usr/local/lib/libscanbtnd-backend_epso= n.so'"; > }; > > # WB > # remove Epson Perfection 1640SU uscanner0 link and stop scanbuttond > detach 20 { > =A0 =A0 =A0 =A0device-name "ugen[0-9].[0-9]"; > =A0 =A0 =A0 =A0match "vendor" "0x04b8"; > =A0 =A0 =A0 =A0match "product" "0x010a"; > =A0 =A0 =A0 =A0action "/usr/bin/pkill scanbuttond"; > }; > > Thank you for your message. I have added the following: # AAO # detect HP ScanJet 3300C attach 20 { device-name "ugen[0-9].[0-9]"; match "vendor" "0x03f0"; match "product" "0x0205"; action "usb_devaddr=3D`echo $device-name | sed 's#^ugen##'` && \ chown root:saned /dev/usb/${usb_devaddr}.* && \ chmod 0660 /dev/usb/${usb_devaddr}.* && \ su saned -c '/usr/local/bin/scanbuttond \ -s /usr/local/etc/scanbuttond/buttonpressed.sh \ -S /usr/local/etc/scanbuttond/initscanner.sh \ -b /usr/local/lib/libscanbtnd-backend_epson.so'"; }; # AAO # remove HP ScanJet 3300C detach 20 { device-name "ugen[0-9].[0-9]"; match "vendor" "0x03f0"; match "product" "0x0205"; action "/usr/bin/pkill scanbuttond"; }; to file /etc/devd.conf and xsane still tells me that I do not have any devi= ces? I restarted devd service # /etc/rc.d/devd restart and I get : quadcore# /etc/rc.d/devd restart devd not running? Starting devd. devd: devd already running, pid: 801 /etc/rc.d/devd: WARNING: failed to start devd I have also added myself to the "saned" group: quadcore# cat /etc/group | grep 'saned' saned:*:194:olivares What else do I need to do? Thank you for your help & suggestions. Regards, Antonio