On Thu, Sep 26, 2013 at 2:08 PM, Michael Hennebry < hennebry@web.cs.ndsu.nodak.edu> wrote:
On Thu, 26 Sep 2013, Robert Heller wrote:
It looks like to use the scanner you need to edit your /etc/group file
or use
the user manager to add yourself to the lp group.
That did not work. I ran a separate login to get one that admitted I was in the lp group. Applying strace to hp-scan told me that it could not open /dev/bus/usb/001/006 for writing. Its owner and group are both root.
you could do a script that wrappers all of the setup kinds of stuff, possibly a script named 'scanner' with lines like
#!/bin/sh
if [ -f /var/tmp/scanner.run ] echo sorry, currently running as `cat /var/tmp/scanner.run` exit 0 fi me=`whomai` echo $me > /var/tmp/scaner.sun sudo chown $me /dev/bus/usb/001/006 #need appropriate sudo changes to make this happen, probably # don't want everyone running chown as root, doubly so for any old device. # #this might need some experimentation, perhaps it should just be group ownership and privs that change # #this should probably be much brighter and pull the right path/info/devices from lsusb, but I don't #have the hardware, and haven't seen the output. maybe it's not even possible? xsane #(or whatever scanner program you really want to use)
sleep 3 #give it a little time after the program closes, although I might just be paranoid rm /var/tmp/scanner.run
then get all the end users (or possibly just you) into the habit of using the script ?