[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Hotplug USB printer agent not remove'ing



	I have a Canon BJC-3000 USB-connected printer, and for some
reason it will quite frequently loose connection with the computer.  I
don’t know if it is my toddler messing the cables, a defective cable,
whatever.

	It shouldn’t be a big deal, simply taking the cable off and on
again does the trick as far as lsusb is concerned.  The real, big,
hugely annoying problem is called CUPS.

	The thing with CUPS is that whenever that happens, even if
lsusb reports the printer again, it complains about ‘Printer fault’ or
something the like.  Sometimes restarting it works, more often I have
to recreate the queue.

	So I digged up a little bit and found out that hotplug should
do it.  Thus I went to /etc/hotplug/usb/ with mighty GNU Emacs, and
created both a file named bjc3k.usermap…:

canon_bjc3k	0x0003	0x04a9	0x1051 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0


	…and a script called canon_bjc3k:

#!/bin/sh
case $ACTION in

add)
	foomatic-configure -s cups -n CBJC3K -N "Canon BJC 3000" -c usb://Canon/BJC-3000 -p Canon-BJC-3000 -d s400a1.upp -o PageSize=A4
	;;

remove)
	foomatic-configure -s cups -n CBJC3K -R
	;;

esac


	Only that whenever I take the plug off or on, it always
execute the add action, never the remove one.  So it is useless.

	¿Hints, ideas?

	¡Thanks in advance!


-- 
Leandro Guimarães Faria Corsetti Dutra           +55 (11) 5685 2219
Av Sgto Geraldo Santana, 1100 6/71        leandro@dutra.fastmail.fm
04.674-000  São Paulo, SP                                    BRASIL
http://br.geocities.com./lgcdutra/



Reply to: