Re: Using a scanner (USB) as user and not as root

2010-04-30 Thread Marco Beishuizen
On Fri, 30 Apr 2010, Warren Block wrote: On Thu, 29 Apr 2010, Marco Beishuizen wrote: On Thu, 29 Apr 2010, Warren Block wrote: One more problem: there should be a quote at the end of the last line. attach 100 { device-name ugen[0-9].[0-9]; match vendor 0x04b8; match

Re: Using a scanner (USB) as user and not as root

2010-04-29 Thread Marco Beishuizen
On Wed, 28 Apr 2010, Warren Block wrote: You can use devd.conf for this: attach 100 { device-name ugen[0-9].[0-9]; match vendor 0x04b8; match product 0x010a; action usb_devaddr=`echo $device-name | sed 's#^ugen##'` \ chown root:saned

Re: Using a scanner (USB) as user and not as root

2010-04-29 Thread David DEMELIER
2010/4/28 Warren Block wbl...@wonkity.com: On Wed, 28 Apr 2010, Marco Beishuizen wrote: On Wed, 28 Apr 2010, Roland Smith wrote: Are the permissions correct? Check with 'ls -l /dev/usb/ /dev/ugen*'. Is your user-id in the usb group? Check by running 'id' as the normal user. If all that is

Re: Using a scanner (USB) as user and not as root

2010-04-29 Thread Warren Block
On Thu, 29 Apr 2010, Marco Beishuizen wrote: On Wed, 28 Apr 2010, Warren Block wrote: You can use devd.conf for this: attach 100 { device-name ugen[0-9].[0-9]; match vendor 0x04b8; match product 0x010a; action usb_devaddr=`echo $device-name | sed 's#^ugen##'` \

Re: Using a scanner (USB) as user and not as root

2010-04-29 Thread Marco Beishuizen
On Thu, 29 Apr 2010, Warren Block wrote: For the sake of completeness: devd has to be restarted after changes to devd.conf, and the code above is only executed when the scanner is detected (USB cable plugged in or scanner powered on). I rebooted and plugged in the scanner but no changes.

Re: Using a scanner (USB) as user and not as root

2010-04-29 Thread Warren Block
On Thu, 29 Apr 2010, David DEMELIER wrote: 2010/4/28 Warren Block wbl...@wonkity.com: devfs.rules don't apply to devices that are created dynamically after boot-up.  Or I guess they might be if you reload the ruleset with applyset after the device is created, but devd is a lot more capable.

Re: Using a scanner (USB) as user and not as root

2010-04-29 Thread Warren Block
On Thu, 29 Apr 2010, Marco Beishuizen wrote: On Thu, 29 Apr 2010, Warren Block wrote: For the sake of completeness: devd has to be restarted after changes to devd.conf, and the code above is only executed when the scanner is detected (USB cable plugged in or scanner powered on). I rebooted

Re: Using a scanner (USB) as user and not as root

2010-04-29 Thread Warren Block
On Thu, 29 Apr 2010, Warren Block wrote: On Wed, 28 Apr 2010, Warren Block wrote: You can use devd.conf for this: attach 100 { device-name ugen[0-9].[0-9]; match vendor 0x04b8; match product 0x010a; action usb_devaddr=`echo $device-name | sed 's#^ugen##'` \

Re: Using a scanner (USB) as user and not as root

2010-04-29 Thread Marco Beishuizen
On Thu, 29 Apr 2010, Warren Block wrote: One more problem: there should be a quote at the end of the last line. attach 100 { device-name ugen[0-9].[0-9]; match vendor 0x04b8; match product 0x010a; action usb_devaddr=`echo $device-name | sed 's#^ugen##'` \

Re: Using a scanner (USB) as user and not as root

2010-04-29 Thread Roland Smith
On Thu, Apr 29, 2010 at 03:09:02PM -0600, Warren Block wrote: On Thu, 29 Apr 2010, Marco Beishuizen wrote: On Thu, 29 Apr 2010, Warren Block wrote: For the sake of completeness: devd has to be restarted after changes to devd.conf, and the code above is only executed when the scanner is

Re: Using a scanner (USB) as user and not as root

2010-04-29 Thread Warren Block
On Thu, 29 Apr 2010, Marco Beishuizen wrote: On Thu, 29 Apr 2010, Warren Block wrote: One more problem: there should be a quote at the end of the last line. attach 100 { device-name ugen[0-9].[0-9]; match vendor 0x04b8; match product 0x010a; action

Re: Using a scanner (USB) as user and not as root

2010-04-29 Thread Warren Block
On Fri, 30 Apr 2010, Roland Smith wrote: On Thu, Apr 29, 2010 at 03:09:02PM -0600, Warren Block wrote: One other difference I found in my /etc/devfs.rules: add path 'ugen*' mode 0660 group operator add path 'usb/*' mode 0770 group operator Mode 0660 should be sufficient. Just tried, and

Re: Using a scanner (USB) as user and not as root

2010-04-28 Thread Roland Smith
On Wed, Apr 28, 2010 at 07:50:04PM +0200, Marco Beishuizen wrote: Hi, I have a flatbed scanner (a HP ScanJet 4400c) that works with SANE (and Xsane), but only as root and I want to access it as user. After some googling and reading the handbook I copied the default file

Re: Using a scanner (USB) as user and not as root

2010-04-28 Thread Marco Beishuizen
On Wed, 28 Apr 2010, Roland Smith wrote: Are the permissions correct? Check with 'ls -l /dev/usb/ /dev/ugen*'. Is your user-id in the usb group? Check by running 'id' as the normal user. If all that is in order, remove all lines except the three above from /etc/devfs.rules, and try again.

Re: Using a scanner (USB) as user and not as root

2010-04-28 Thread Warren Block
On Wed, 28 Apr 2010, Marco Beishuizen wrote: On Wed, 28 Apr 2010, Roland Smith wrote: Are the permissions correct? Check with 'ls -l /dev/usb/ /dev/ugen*'. Is your user-id in the usb group? Check by running 'id' as the normal user. If all that is in order, remove all lines except the three

Re: Using a scanner (USB) as user and not as root

2010-04-28 Thread Roland Smith
On Wed, Apr 28, 2010 at 09:00:40PM +0200, Marco Beishuizen wrote: On Wed, 28 Apr 2010, Roland Smith wrote: Are the permissions correct? Check with 'ls -l /dev/usb/ /dev/ugen*'. Is your user-id in the usb group? Check by running 'id' as the normal user. If all that is in order, remove