Link between CUPS and HOTPLUG

Gustavo Amador garios at mexico.com
Sat Aug 21 21:51:05 PDT 2004


Hi there.
I hope you can help me with this.

This is the scenario:
I have a program that is willing to use a printer.
Somebody plugs a usb-printer and HOTPLUG notifies this event.
The program receives the event and uses the printer.

But, what if the printer is not configured?
How can I know if the printer that has recently plugged is ready for use?
Is there any way to know if the printer detected by HOTPLUG is configured
under CUPS?

So the first that I try was to retrieve the values of the environment
variables that HOTPLUG uses when something is connected to the system.
But sadly I noticed that the information seems to be unrelated with that
that CUPS employs.

Here is an example of what the HOTPLUG's variables have and what is in
the /etc/cupss/printers.conf :

$(ACTION) = add
$(DEVICE) = /proc/bus/usb/002/003
$(INTERFACE) = 7/1/2
$(PRODUCT) = 43d/16/100
$(TYPE) = usb
-----
<DefaultPrinter Lexmark>
Info Lexmark z12
Location My room
DeviceURI usb://Lexmark/Z12
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>
-------

Any suggestions will be appreciated.




More information about the cups mailing list