Ecco qui : /lib/udev/rules.d/40-libsane.rules
Codice: Seleziona tutto
# This file was automatically created based on description files (*.desc)
# by sane-desc 3.5 from sane-backends 1.0.25git
#
# udev rules file for supported USB and SCSI devices
#
# The SCSI device support is very basic and includes only
# scanners that mark themselves as type "scanner" or
# SCSI-scanners from HP and other vendors that are entitled "processor"
# but are treated accordingly.
#
# To add a USB device, add a rule to the list below between the
# LABEL="libsane_usb_rules_begin" and LABEL="libsane_usb_rules_end" lines.
#
# To run a script when your device is plugged in, add RUN+="/path/to/script"
# to the appropriate rule.
#
# If your scanner isn't listed below, you can add it as explained above.
#
# If your scanner is supported by some external backend (brother, epkowa,
# hpaio, etc) please ask the author of the backend to provide proper
# device detection support for your OS
#
# If the scanner is supported by sane-backends, please mail the entry to
# the sane-devel mailing list (sane-devel@lists.alioth.debian.org).
#
ACTION!="add", GOTO="libsane_rules_end"
ENV{DEVTYPE}=="usb_device", GOTO="libsane_create_usb_dev"
SUBSYSTEMS=="scsi", GOTO="libsane_scsi_rules_begin"
SUBSYSTEM=="usb_device", GOTO="libsane_usb_rules_begin"
SUBSYSTEM!="usb_device", GOTO="libsane_usb_rules_end"
# Kernel >= 2.6.22 jumps here
LABEL="libsane_create_usb_dev"
# For Linux >= 2.6.22 without CONFIG_USB_DEVICE_CLASS=y
# If the following rule does not exist on your system yet, uncomment it
# ENV{DEVTYPE}=="usb_device", MODE="0664", OWNER="root", GROUP="root"
# Kernel < 2.6.22 jumps here
LABEL="libsane_usb_rules_begin"
# Hewlett-Packard ScanJet 4100C
ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="0101", ENV{libsane_matched}="yes"
# Hewlett-Packard ScanJet 4200C | Hewlett-Packard ScanJet 4200Cxi | Hewlett-Packard ScanJet 4200Cse
.. ho tagliato una parte ..
Codice: Seleziona tutto
ATTRS{idVendor}=="413c", ATTRS{idProduct}=="5250", ENV{libsane_matched}="yes"
# Dell Dell 1235cn
ATTRS{idVendor}=="413c", ATTRS{idProduct}=="5310", ENV{libsane_matched}="yes"
# Brother scanners
ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"
# The following rule will disable USB autosuspend for the device
ENV{libsane_matched}=="yes", RUN+="/bin/sh -c 'if test -e /sys/$env{DEVPATH}/power/control; then echo on > /sys/$env{DEVPATH}/power/control; elif test -e /sys/$env{DEVPATH}/power/level; then echo on > /sys/$env{DEVPATH}/power/level; fi'"
LABEL="libsane_usb_rules_end"
SUBSYSTEMS=="scsi", GOTO="libsane_scsi_rules_begin"
GOTO="libsane_scsi_rules_end"
LABEL="libsane_scsi_rules_begin"
# Generic: SCSI device type 6 indicates a scanner
KERNEL=="sg[0-9]*", ATTRS{type}=="6", ENV{libsane_matched}="yes"
# Some scanners advertise themselves as SCSI device type 3
# Wildcard: for some Epson SCSI scanners
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="SCANNER*", ENV{libsane_matched}="yes"
# Epson Expression 800
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Expression800", ENV{libsane_matched}="yes"
# Epson Perfection 2450
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-9700", ENV{libsane_matched}="yes"
# Epson Perfection 3200
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-9800", ENV{libsane_matched}="yes"
# Epson Perfection 636S | Epson Perfection 1200S
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection1200", ENV{libsane_matched}="yes"
# Epson Perfection 636
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection636", ENV{libsane_matched}="yes"
# Hewlett-Packard ScanJet 4p
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1130A", ENV{libsane_matched}="yes"
# Hewlett-Packard ScanJet IIc
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1750A", ENV{libsane_matched}="yes"
# Hewlett-Packard ScanJet IIp
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1790A", ENV{libsane_matched}="yes"
# Hewlett-Packard ScanJet IIcx
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C2500A", ENV{libsane_matched}="yes"
# Hewlett-Packard ScanJet 4c
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C2520A", ENV{libsane_matched}="yes"
# Hewlett-Packard ScanJet 5p
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C5110A", ENV{libsane_matched}="yes"
# Hewlett-Packard ScanJet 6200C
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C6270A", ENV{libsane_matched}="yes"
# Hewlett-Packard ScanJet 6300C
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C7670A", ENV{libsane_matched}="yes"
LABEL="libsane_scsi_rules_end"
ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"
LABEL="libsane_rules_end"
[/code]