skanlite need root

Some thoughts:
/etc/rc.conf
Code:
devfs_system_ruleset="localrules"
/etc/devfs.rules
Code:
[localrules=5]
add path 'usb/*' mode 0666 group operator
add path 'ugen[0-9]*' mode 0666 group operator
Extra:
Are you a member of operator?
 
I am member of operator
/etc/group :
Code:
operator:*:5:root,x,toot,toor
In /etc/rc.conf:
Code:
devfs_rulesets="/etc/defaults/devfs.rules /etc/devfs.rules" # Files containing devfs(8) rules.
devfs_system_ruleset="localrules" # The name (NOT number) of a ruleset to apply to /dev
devfs_set_rulesets=""   # A list of /mount/dev=ruleset_name settings to apply (must be mounted already, i.e. fstab(5))
devfs_load_rulesets="YES"  # Enable to always load the default rulesets
And /etc/devfs.rules
Code:
[localrules=10]
add path 'ad*'    mode 0666 group operator
add path 'da*'    mode 0666 group operator
add path 'acd*'   mode 0666 group operator
add path 'cd*'    mode 0666 group operator
add path 'mmcsd*' mode 0666 group operator
add path 'pass*'  mode 0666 group operator
add path 'xpt*'   mode 0666 group operator
add path 'ugen*'  mode 0666 group operator
add path 'usbctl' mode 0666 group operator
add path 'usb*'   mode 0666 group operator
add path 'lpt*'   mode 0666 group operator
add path 'ulpt*'  mode 0666 group operator
add path 'unlpt*' mode 0666 group operator
add path 'fd*'    mode 0666 group operator
add path 'uscan*' mode 0666 group operator
add path 'video*' mode 0666 group operator
add path 'dvb/*'  mode 0666 group operator
add path 'tuner*' mode 0666 group operator
add path 'xpt*'   mode 0666 group operator
add path 'usb/*'  mode 0660 group operator

Still skanlite needs root otherwise sane finds no devices
 
Have a look at the graphics/sane-backends post-install message ( pkg info -D sane-backends ). Excerpt:

Code:
...
If you are using a USB scanner, you should create
%%PREFIX%%/etc/devd/saned.conf to allow saned access permissions.
Currently, devfs.rules(5) has no support for USB specific filters
such as vendor, product and serial number.
...
 
#usbconfig -d 0.8 dump_device_desc
Code:
ugen0.8: <SEIKO EPSON USB MFP> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (2mA)
  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0110
  bDeviceClass = 0x0000  <Probed by interface class>
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0000
  bMaxPacketSize0 = 0x0040
  idVendor = 0x04b8
  idProduct = 0x084d
  bcdDevice = 0x0100
  iManufacturer = 0x0001  <SEIKO EPSON>
  iProduct = 0x0002  <USB MFP>
  iSerialNumber = 0x0003  <LK4Z448730>
  bNumConfigurations = 0x0001

I edited saned.conf:
Code:
notify 100 {
        match "system" "USB";
        match "subsystem" "INTERFACE";
        match "type" "ATTACH";
        match "cdev" "ugen0.8";
        match "vendor" "0x04b8";
        match "product" "0x084d";
        action "chown -L cups:saned /dev/$cdev && chmod -L 660 /dev/$cdev";
};
Issued
/etc/rc.d/devd restart
But skanlite still does not find scanners as regular user

ls -al /dev/usb | grep 0.8.0 shows
crw-rw---- 1 root cups 0x11a Dec 1 16:15 0.8.0
It does not belong to group operator.

ls -al /dev has no files belonging to cups:saned
 
ls -al /dev/usb | grep 0.8.0 shows
crw-rw---- 1 root cups 0x11a Dec 1 16:15 0.8.0
It does not belong to group operator.

ls -al /dev has no files belonging to cups:saned
Put the user in the cups group.

Also it's not a good idea to set match "cdev" "ugen0.8"; . If the device is unplugged and other devices plugged in, the USB bus number will change if plugged in back, better set match "cdev" "ugen[0-9].[0-9]"; , as in the post-install message given as example.

In /etc/rc.conf:
Code:
devfs_rulesets="/etc/defaults/devfs.rules /etc/devfs.rules" # Files containing devfs(8) rules.
...
devfs_set_rulesets="" # A list of /mount/dev=ruleset_name settings to apply (must be mounted already, i.e. fstab(5))
devfs_load_rulesets="YES" # Enable to always load the default rulesets
Furthermore the above settings in /etc/rc.conf are superfluous, they are already set as default in /etc/defaults/rc.conf. In /etc/rc.conf those options only need to be specified to override the defaults.
 
I tried setuid of skanlite,xsane,gscan2pdf but none work.
So I just rely on going to root as it doesn't work in my case.
It would be nice to hear if it works for other people.
 
So I just rely on going to root as it doesn't work in my case.
It would be nice to hear if it works for other people.
Have you tried adding the user to the cups group?

Apparently there is no need of a /usr/local/etc/devd/saned.conf if print/cups is installed, tested on my system. /usr/local/etc/devd/cups.conf takes care of the scanner, multi-functional (all-in-one) in my case. Only the user has to be specified in the cups group.

/usr/local/etc/devd/cups.conf
Code:
# Allow members of group cups to access generic USB printer devices

notify 100 {
    match "system"        "USB";
    match "subsystem"    "INTERFACE";
    match "type"        "ATTACH";
    match "intclass"    "0x07";
    match "intsubclass"    "0x01";
    match "intprotocol"    "(0x01|0x02|0x03)";
    action "chgrp cups /dev/$cdev; chmod g+rw /dev/$cdev";
};
 
Back
Top