Apparently I hadn't done any scanning since my move to centos. hp-scan works for root, but not for me as me. When I try to use xsane, it tells me no device found. When I try to use hp-scan as myself it tells me: error: Unable to locate device hpaio:/usb/Photosmart_C3100_series?serial=CN6ARC321S04KV using SANE backend hpaio:. Please check HPLIP installation. What do I change to make it let me use xsane or hp-scan as myself? This is what I get when scanning as root: [root at localhost tmp]# hp-scan -o fred.png warning: hp-scan should not be run as root/superuser. HP Linux Imaging and Printing System (ver. 3.12.4) Scan Utility ver. 2.2 Copyright (c) 2001-14 Hewlett-Packard Development Company, LP This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to distribute it under certain conditions. See COPYING file for more details. Using device: hpaio:/usb/Photosmart_C3100_series?serial=CN6ARC321S04KV Using device hpaio:/usb/Photosmart_C3100_series?serial=CN6ARC321S04KV Opening connection to device... Resolution: 300dpi Mode: gray Compression: JPEG Scan area (mm): Top left (x,y): (0.000000mm, 0.000000mm) Bottom right (x,y): (215.899994mm, 296.925995mm) Width: 215.899994mm Height: 296.925995mm Destination(s): file Output file: /tmp/fred.png Warming up... Scanning... Expecting to read 8.5 MB from scanner. Reading data: [******************************************] 100% 8.5 MB Read 8.5 MB from scanner. Closing device. Outputting to destination 'file': Saving to file /tmp/fred.png Done. BTW it lied about the compression. It gave me png. -- Michael hennebry at web.cs.ndsu.NoDak.edu "On Monday, I'm gonna have to tell my kindergarten class, whom I teach not to run with scissors, that my fiance ran me through with a broadsword." -- Lily
On Tue, 24 Sep 2013 17:57:12 -0500 (CDT) Michael Hennebry wrote:> What do I change to make it let me use xsane or hp-scan as myself?You need to set the permission on the scanner device to allow your username to use it, since it's apparently now set to allow root only. scanimage -L will tell you where it is. -- MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com
On Wed, 25 Sep 2013, Robert Heller wrote:> At Wed, 25 Sep 2013 13:34:51 -0600 CentOS mailing list <centos at centos.org> wrote:> The proper cure for this is to add yourself to the group that udev puts the > device in. Look in /etc/udev/rules.d. Under CentOS 5 with hplip3-common > installed, this would be 55-hpmud.rules.I'm running centos 6. Googling tells me the corresponding centos 6 directory is /lib/udev/rules.d . There are no files with 55 or hp in their names, but there are 39 with the string usb . Where should I be looking? -- Michael hennebry at web.cs.ndsu.NoDak.edu "On Monday, I'm gonna have to tell my kindergarten class, whom I teach not to run with scissors, that my fiance ran me through with a broadsword." -- Lily
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. -- Michael hennebry at web.cs.ndsu.NoDak.edu "On Monday, I'm gonna have to tell my kindergarten class, whom I teach not to run with scissors, that my fiance ran me through with a broadsword." -- Lily
Michael Hennebry wrote:> On Thu, 26 Sep 2013, Robert Heller wrote: > >> It looks like to use the scanner you need to edit your /etc/group fileor 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.I'll try again. google for centos 6 scanner ownership permissions The first hit I got is a thread on this list from '11 or last year. The last post in the thread ends with: Excerpt: Actual fix: 1) # scanimage -L device `epkowa:interpreter:001:005' is a Epson (unknown model) flatbed scanner to get the bus and the device (in the above, bus = 001; device = 005) 2) "lsusb" to get the ID # lsusb | grep -i "bus 001" | grep -i "device 005" Bus 001 Device 005: ID 04b8:0131 Seiko Epson Corp. 3) cd to the udev "sane" directory # cd /etc/udev/rules.d 4) find the "sane" configuration file. # ls | grep -i sane 60-libsane.rules 5) add an entry into the sane configuration file for your scanner. Note: the ATTRS{idVendor} is the first half of your ID above (04b8) the ATTRS{idProduct} is the second half of your ID above (0131) the name in the comments you make up yourself if you put all your users into group "users", then use "users" for the group below. If you use a different group for each user, then create a group called "scanners" (groupadd scanners), use "scanners" for the group below, and add each user to the "scanners" group # Epkowa Epson Perfection V300 ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0131", ENV{libsane_matched}="yes", MODE="0664", OWNER="root", GROUP="users" --- end excerpt --- Modify to fit your system and device. mark
On Thu, 26 Sep 2013, Robert Heller wrote:> OK, this is what you need to do: > > Create a file named /lib/udev/rules.d/90-local.rules containing this line: > > SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="5611", GROUP="scanner", MODE="0660" > > > (This means: on the USB subsystem, for a device with vendor id 03f0 (HP), and > product id 5611 (Photosmart C3180), change its group to 'scanner', and its > mode to 0660.) > > then execute this command (probably not needed, but can't hurt): > > udevadm control --reload-rules > > make sure there is a group named 'scanner' and that you are a member of it > (yes, you have to logout/login again to get the group update). > > unplug and re plug in the device. The device file fill now be in group scanner > with group rw permission and anyone in the scanner group can run hp-scan and > access the scanner (note it probably won't be /dev/bus/usb/001/006, but > something else (/dev/bus/usb/001/007 probably and /dev/bus/usb/001/006 will vanish).That did the trick. I used lp instead of scanner because I'd already made myself a member of lp. Thanks.> I don't know if this will bork things if you plan to use this thing as a > printer under CentOS (I am not sure what user the CUPS daemon runs as). If > necessary, you might need to tweek the rules file to be compatible with CUPS > or add the UID used by the CUPS daemon to 'scanner'.Printing works fine. The only issue I've noticed is that if I leave paper in the all-in-one, it wants to copy, not just scan. I'm not sure whether that is a change. It's been an OS ago since I wanted to scan. -- Michael hennebry at web.cs.ndsu.NoDak.edu "On Monday, I'm gonna have to tell my kindergarten class, whom I teach not to run with scissors, that my fiance ran me through with a broadsword." -- Lily