[cups-devel] Temporary print queues

Michael Sweet msweet at apple.com
Wed May 17 18:47:54 PDT 2017


Till,

> On May 17, 2017, at 7:05 PM, Till Kamppeter <till.kamppeter at gmail.com> wrote:
> 
> Hi,
> 
> I have some more question about temporary (local) print queues.
> 
> 1. Print queue auto-creation only works with certain functions of the new CUPS API, like cupsGetDest(), but it does not happen when I use command line utilities like "lp" or "lpstat". Is this intended?

Since the most recent changes in the Github sources, the "lp" and "lpr" programs will auto-create queues, however the "lpstat" program is specifically written to report the status of print queues.

We *could* add an lpstat option to enumerate discovered printers (please file a bug...) but I wouldn't want to change "lpstat -p" or "lpstat -v" to list discovered (but not configured) queues as that might cause compatibility issues.

> I would like to have an option for lpstat to also list the discovered printers for which there is no CUPS queue (yet) and if I call "lp", "lpoptions", "lpstat", ... with the name of such a printer as destination name that CUPS creates a temporary queue and executes the command instead of giving an error.
> 
> 2. cups-browsed does not only get the Avahi cache showing the currently available printers but also runs Avahi browsers to catch events of printers appearing an disappearing, so it always knows which printers are available and according to this creates and removes queues. Does cupsd also catch Avahi events to remove temporary queues when a remote printer disappears?

No, in the current implementation cupsd only discards temporary queues on exit, so generally speaking they will go away several seconds after the last job completes.

> 3. If I start cupsd and then call cupsEnumDests() I get a list of available printers, including the DNS-SD-discovered ones. Now I call an API function to make CUPS create a temporary queue for a DNS-SD-discovered printer. This makes the auto-generated PPD file appear in /etc/cups/ppd/. Now I stop cupsd and the PPD is still there. Should it not disappear as the temporary queue disappears when CUPS terminates?

It should delete the PPD - please file a bug.

> I use Ubuntu Zesty with CUPS 2.2.2 but have replaced libcups.so.2 by the current GIT state of the art of CUPS (and restarted cupsd, cups-browsed, and avahi-daemon).

It would be useful if you could test things with all of the current Github code...

_________________________________________________________
Michael Sweet, Senior Printing System Engineer



More information about the cups-devel mailing list