Skanlite only find my usb scanner when started as root user.
What is the solution to start the application as a regular user
What is the solution to start the application as a regular user
operator:*:5:root,x,toot,toor
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
[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
pkg info -D sane-backends
). Excerpt:...
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.
...
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
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";
};
Put the user in thels -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
cups
group.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.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.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
Have you tried adding the user to theSo 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.
cups
group?cups
group.# 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";
};