[SOLVED] Re: [sane-devel] Canon LiDE 30 FC 5 hotplug question

Richard England rengland at europa.com
Sun Apr 30 06:29:52 UTC 2006


Richard England wrote:
> I've updated my machine from FC4, in which I did not try Xsane (etc.)  
> to FC 5.  When I plug in my Canon LiDE 30 USB scanner and fire up 
> Xsane, it announces that it cannot find a scanner.  However, if I 
> leave it plugged in, logout, and log back in, then Xsane finds the 
> scanner and every thing works swimmingly.   Under FC3  it does not 
> seem to matter.  Hot plugging the scanner works fine.
>
> Can anyone shed light on why the "hot plug" capability is not working 
> for FC5?  I did notice the "hot plug" scripts are gone but I assumed 
> that was because UDEV (or HAL, or something else) was suppose to take 
> care of this.
>
> Any assistance or enlightenment would be appreciated.
>
> Thank you,
>
Solved, at least to my satisfaction.

hotplug script were apparently removed, as I suspected, in lieu of UDEV.  
/etc/udev/rules/60-libsane.rules

contains a list of the various USB plotters Sane knows about. For my 
scanner, the lines read:

#Canon Inc. | CanoScan N1240U/LIDE 30
SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="220e", SYMLINK+="scanner-%k"

By changing the second of the two lines to read:

SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="220e", 
SYMLINK+="scanner-%k",  MODE="0666"

I can successfully hotplug the scanner and use at as a normal user.

I understand that "0666" is a little wide open but without physical 
access to the machine, no one is likely to be able to connect the 
scanner anyway.

I tried limiting this by adding  GROUP="scanner" to the UDEV rule, 
creating the group "scanner" and adding my account to that group but it 
seems that unless I do a "newgrp scanner" to change my primary group, I 
can't access it.

I'd be glad to learn the proper way to limit this further, or the 
Gnu-Linux-proper way to use groups (they don't seem to be exactly as I'm 
used to on Unix)  if anyone wants to enlighten me.

The only lingering question in my mind is,  "is this as it should be?".  
Shouldn't there be something in place to allow the general user to 
simply plug in a supported scanner and use it without be root or 
modifying the UDEV rules?

Thanks for listening.

-- 
--R
------------------------------------------------------------------------
/Linux, and Open Software, an alternative./
Registered Unix <http://counter.li.org> user #409453



More information about the sane-devel mailing list