SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I just got my first Linux scanner, and need some help setting it up to work under Slackware.
sane-find-scanner gives:
Code:
found USB scanner (vendor=0x04a9 [Canon], product=0x221c [CanoScan], chip=GL841) at libusb:001:008
and when running "scanimage -L" as root I get
Code:
device `genesys:libusb:001:008' is a Canon LiDE 60 flatbed scanner
However, running it as a normal user does not work, which tells me there's a permissions problem, and chmod'ing it won't probably help after I reboot/unplug the device.
dmesg shows activity when I plug/unplug, and lsusb gives
Code:
Bus 001 Device 008: ID 04a9:221c Canon, Inc.
According to udev-howto, it's not possible to write udev rules for scanners, but the sane-documentation refers to udev frequently. I'm having a hard time finding out which is true..
I have not done any changes to /etc/sane.d/* files, but /etc/sane.d/genesys.conf contains my scanner, uncommented.
It is not elegant, but I have been trying to get the hotplug usbscanner scripts ported to usb and only had partial success. The above works for 'wheel' members, but it also gives access to all other USB devices (and you might not want that).
Hey Yalla, if you can please. Let us know how you make out. I'm looking to buy a scanner so I can use it with slackware, and they have that model here for 79 bux at a local store. Seems like a nice every day scanner to use. Thanks.
I guess I could be blamed for putting the standards too high, but what I'd really really like is to be able to just have the scanner work automagically whenever it's plugged in, just like other USB devices... Mounting it means it'll be more complex than in Windows, and my (silly?) quest is to prove my Linux system is both easier and more userfriendly than Windows...
I added the following line to my /etc/udev/rules.d/10-local.rules
This gave me /dev/scanner -> /dev/usbdev1.8 with permission 0666.
However, the scanner still only works for the super-user, which leads me to believe this is a userspace/sane problem rather than a udev/file permission problem.
I noticed that Slackware comes with 0.1.8 rather than the latest 0.1.12 (which according to Pat is because the lates version breaks kernel 2.4), so maybe that's where the problem is.
Will investigate and reporat back when/if I find something. This is an *annoying* problem, as permission-based issues such as programmes/systems functioning as root but breaking as normal users are normally so lame...
I guess I could be blamed for putting the standards too high, but what I'd really really like is to be able to just have the scanner work automagically whenever it's plugged in, just like other USB devices...
That's how my usb scanner works.
Please be patient with me... I know I'm not answering your udev question and maybe I'm missing the point. My understanding is that hotplug uses the entries in libsane.usermap to detect the scanner, and then the libusbscanner script changes the device ownership to root:scanner. Why not just add an entry for your scanner to libsane.usermap and let hotplug take care of this?
This sounds like the problem that I encountered with my Brother DCP-110C scanner/copier/printer. In my case the problem was resolved by adding this line to my /etc/fstab file.
Once again plenty thanks to Alien_Bob and allend and the rest for coming to the rescue.
Adding a line to fstab was all it took and now the scanner works perfectly well for all users!
I guess I read the initial advise wrong, thinking each user would have to manually "mount" the scanner before it would function..
As I still don't understand the underlaying fundamentals of this, I would greatly appreciate if someone could point me towards where i can read up on how the architecture behind this system is designed, and why the scanner must be "mounted"...
Also - I noticed that the /etc/hotplug/usb/libsane.usermap does not contain an entry for my precice scanner, but /etc/sane.d/genesys.conf does - could this cause problems, or is one selectd over the other?
The sane.conf contains both my model (LiDE 60) as well as LiDE 50, 25 and 30. However, the libsane.usermap contains only the LiDE 50.
Also - I noticed that the /etc/hotplug/usb/libsane.usermap does not contain an entry for my precice scanner, but /etc/sane.d/genesys.conf does - could this cause problems, or is one selectd over the other?
Now I'm curious. I understand why changing fstab works. I've just never done it that way. The reason I like using hotplug is that it changes the permissions for just that specific device.
I think that the sane.d stuff recognizes your scanner but doesn't change any permissions. Hotplug does. Would you be up for confirming this? I'd be interested in knowing what happens if you comment out the new fstab line, add your scanner to libsane.usermap, and then plug the scanner in again.
Also - I noticed that the /etc/hotplug/usb/libsane.usermap does not contain an entry for my precice scanner
That's the problem.
When you plug in a USB scanner, hotplug searches thru the libsane.usermap file. If it finds a match, then it'll change the associated device's ownership to 'root:scanner'.
This obviously wasn't happening in your case, hence the inability to use the scanner as a normal user.
Personally, all I had to do was add my user to the 'scanner' group and it worked without having to do anything else. Our scanner is a CanoScan N1240U.
Guys,
Can someone summarize what needs to be done for Slackware 12?
I have read this thread, and want to setup a USB Canoscan N 656U under Slackware 12.
Try adding yourself to the groups 'scanner' and 'plugdev' and see if it works.
Code:
gpasswd -a your_account scanner
gpasswd -a your_account plugdev
Add the correct name for "your_account" in the commands above.
Don't forget to logoff and login again after you added yourself to these groups if you are logged in at the time you run the commands. After that, also restart the messagebus:
Code:
/etc/rc.d/rc.messagebus reload
...and if X is running, restart your X session as well.
Distribution: Slackware ....that's all besides Salix and Porteus
Posts: 500
Rep:
I have been sharing a scanner from a slackware server for awhile now. The server is running Slack-11.0 with a 2.6 kernel. I have no doubt that the way I set up sane in 11.0 will work in 12.0. HPLIP worked just fine for my hp psc2355 on a single machine but sane with hpoj was the way I went for a shared scanner. After it's working on one box its not to hard to share it. Here are my notes (below) for setinng up the first box. The complete networking setup is here: http://www.turtlespond.net/scripts/s...t_server_notes.
Quote:
5. HPOJ and CUPS
As far as I know, my options are rather limited when it comes to networking my HP-PSC scanner. I can do it with Sane but I need hpoj to access the scanner across the lan. Hpoj is no longer in development and has been replaced by HPLIP but the source is still available and it is an easy compile and there is good documentation avaialble in the source's /doc directory. As of yet HPLIP can not be used to network HP scanners
All I need is is to untar the source, then cd into the directory and:
./configure --prefix=/usr
make
checkinstall
installpkg hpoj-0.91-i386-1.tgz
I'm lazy. In this instance I have let checkinstall make the slack pack for me.
After I have connected my two printers and turned them on I will run "ptal-init-setup" a CLI wizard used to set up hpoj-managed devices.
Note that ptal-init has to start before the print spooler (CUPS). I have made up an rc.hpoj script for starting hpoj.
#! /bin/bash
#
# Startup/shutdown script for hpoj
# Note: This script must start before cupsd.
In order to get /etc/rc.d/rc.hpoj to run before /etc/rc.d/rc.cups put the following lines into /etc/rc.d/rc.M just befor the stanza for CUPS
# Start hpoj before CUPS:
if [ -x /etc/rc.d/rc.hpoj ]; then
/etc/rc.d/rc.hpoj start
fi
If you already have an hpoj stanza in rc.M make sure it is called befor CUPS.
Since I started ptal-init when I set up my devices I will have to restart CUPS "with /etc/rc/rc.cups restart" before I can open up my CUPS server at 192.168.1.1:631.
I will then have to delete any previously configured printers on the server and set up new ones because I will now access printers as ptal devices and not usb devices. For example, when configuring my HP-PSC , I would select "Device URI: ptal:/mlc:usb:PSC_2350_series".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.