[cups] Configuration of Client-Side Avahi browsing
Johannes Meixner
jsmeix at suse.de
Fri Nov 27 03:57:17 PST 2015
Hello,
I am really not an expert here but as far as I know it is
basically as follows:
Since CUPS 1.6 networking "printer" discovery does no longer
happen via CUPS' own traditional "CUPS Browsing" method
but instead via DNS-SD.
For DNS-SD under Linux CUPS is liked with Avahi.
Basically - as far as I understand it - it is primarily Avahi
that gets all incoming DNS-SD information in particular
information about "printers" in the network that advertise
themselves via DNS-SD.
I wrote "printer" because what actually such a "printer" is
depends on what actually submits DNS-SD information into
the network.
For example network printer devices can advertise themselves
via DNS-SD so that in this case a "printer" is a real piece
of hardware.
But also CUPS > 1.6 can advertise its print queues via DNS-SD
so that in this case a "printer" is not a real piece of hardware
but some kind of abstract representation (i.e. a print queue).
All kind of DNS-SD "printer" information is collected by Avahi
and applications can gets this information directly from Avahi.
For example - as far as I know - GTK printing dialog widgets
can do this and - as far as I know - GTK can do this also
without a locally running cupsd because GTK can ask
directly Avahi for the DNS-SD "printer" information.
On Nov 23 14:07 Alexander Hofmann wrote (excerpt):
> I'm currently trying to find the portion of code adding hundreds of
> printers to my "Print Document"-Dialog by querying Avahi. I first
> accused GTK of doing this, but it seems that cups now has this feature
> it self...
I guess it is GTK that gets it directly from Avahi
(but I do not know about GTK internals)
regardless that also CUPS has DNS-DS support in itself.
> I can disable "avahi-daemon" or disable it's DBus
> interface which will stop this,
This seems to prove that it is more related to Avahi
than to the DNS-DS support in CUPS.
> but I'd be more satisfied if I could
> configure this directly.
I am afraid - I do not know how to configure Avahi so that it
may ignore certain kind of DNS-SD "printer" information.
> It's also not related to "cups-browsed"
Because "cups-browsed" is not for DNS-SD
but for the traditional "CUPS Browsing" method.
> a) does cups (version 1.7.2 as in Linux Min 17.2), without the
> browsed-daemon, have the feature of searching and including Avahi-based
> printers and adding them dynamically to the list? I checked the source
> of "dnssd" and "mdns" backends, they utilize Avahi, but removing them
> doesn't change anything
CUPS backends are meant for sending print jobs (or printing data)
to a recipient.
CUPS backends for sending printing data via network are
also meant for discovery of network printer devices that
is useful to set up a print queue for a network printer device.
But CUPS backends are not meant for the daily-usage discovery
of available ready-to-use "printer" objects in the network
whereto an application can submit a print job.
For example a raw network printer device is ofter not
a ready-to-use "printer" object whereto an application
can submit a print job because often for a raw network printer
device one must set up a print queue with a matching driver
and then that print queue is a ready-to-use "printer" object
whereto an application can submit a print job.
> b) Is there any possibility to ask cups who actually added the printer
> to the list? I.e., if some Mint-Specific daemon caused the problem -
> could I ask cups to tell me the process or script etc. that added the
> printer?
I am afraid - I cannot answer this question because
do not know the internals.
Kind Regards
Johannes Meixner
--
SUSE LINUX GmbH - GF: Felix Imendoerffer, Jane Smithard,
Graham Norton - HRB 21284 (AG Nuernberg)
More information about the cups
mailing list