Changes

From Amahi Wiki
Jump to: navigation, search
826 bytes added ,  01:25, 1 September 2009
no edit summary
That should be it.
 
An alternate idea: a shell script at install, to set up a rule for you.
 
if [ $UID -ne 0 ]; then
echo "Please, type root's password..."
su -c "$0 $@"
exit
fi
 
lsusb
 
echo "Please enter the vendor ID of your scanner (number to the left of the colon):"
read vend_ID
echo "Please enter the product ID of your scanner (number to the right of the colon):"
read product_ID
echo "SUBSYSTEM==\"usb\", ATTR{idVendor}==\""$vend_ID"\",ATTR{idProduct}==\""$product_ID'", ACTION="add",NAME="bus/usb/$env{BUSNUM}/$env\{DEVNUM\}", GROUP="scanner",OPTIONS+="last_rule"' > /etc/udev/rules.d/22_scanner.rules
 
Basically, this makes sure the script is running as root (and becomes root if not), lists the currently attached USB devices, and asks for the vendor and product IDs. It then pastes those into a rule that will work.
54

edits