[SM-Discuss] [other] Re: udev, usb and cups

Treeve Jelbert treeve at scarlet.be
Wed May 10 08:18:29 EDT 2006


On Wednesday 10 May 2006 12:11, Juuso Alasuutari wrote:
> On Wednesday 10 May 2006 13:11, Flavien Bridault wrote:
> > Le mercredi 10 mai 2006 à 12:58 +0300, Juuso Alasuutari a écrit :
>
> <clip>
>
> > > It could be that the "normal" printer rule is being used before the usb
> > > one. Here's what we have in /etc/udev/rules.d/50-default.rules now:
> > >
> > > # printer
> > > KERNEL=="lp*", 		NAME="%k", GROUP="lp", MODE="0660"
> > > KERNEL=="irlpt", 	NAME="%k", GROUP="lp", MODE="0660"
> > > KERNEL=="usblp", 	NAME="%k", GROUP="lp", MODE="0660"
> > > KERNEL=="parport*", 	NAME="%k", GROUP="lp", MODE="0660"
> > > BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k", GROUP="lp", MODE="0660"
> > >
> > > If the problem is what I think it is, moving the last line before the
> > > others should cause udev to use it for usb printers and create
> > > /dev/usb/lp*. Try it and tell if it works.
> >
> > Would it not be better to add a BUS field for all these rules to prevent
> > those kind of problems ? I suppose this would be BUS=="ide" for lp ?
>
> Well, I'd choose the option involving the least new characters :). Since
> udev takes the first rule that matches and stops there, just moving the
> BUS=="usb" line should work perfectly.
my rules file now looks like

# printer
BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k", GROUP="lp", MODE="0660"
KERNEL=="lp*",          NAME="%k", GROUP="lp", MODE="0660"
KERNEL=="irlpt",        NAME="%k", GROUP="lp", MODE="0660"
KERNEL=="usblp",        NAME="%k", GROUP="lp", MODE="0660"
KERNEL=="parport*",     NAME="%k", GROUP="lp", MODE="0660"


cups now recognises the printers as usb devices when I replug them.
-- 
Regards, Treeve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/sm-discuss/attachments/20060510/45685900/attachment.bin 


More information about the SM-Discuss mailing list