Re: Bug#982925: libgtk: print dialog lists autodetected printer twice

Simon McVittie <[email protected]>
Newsgroups gmane.linux.debian.devel.desktop,gmane.linux.debian.devel.gtk-gnome
Message-ID <[email protected]>
Here is hopefully a better solution for GTK 3 in bullseye:

    https://people.debian.org/~smcv/bullseye-gtk-printing/mr6.1/

or if the release team will not accept that, then this:

    https://people.debian.org/~smcv/bullseye-gtk-printing/mr9.1/

Please try those (in preference to mr6, mr9) and see what happens with
your particular printers.

As before, the _binary.changes and .dsc files are signed with my key in
the Debian keyring, and can be verified with the dscverify tool from the
devscripts package (this requires devscripts and debian-archive-keyring
installed).

Test results below.

    smcv

> * Which versions of cups-daemon and cups-filters-core-drivers are installed?

cups-daemon	2.3.3op2-3+deb11u1
cups-filters-core-drivers	1.28.7-1

> * How many printers are physically present on your network?

One HP Color LaserJet MFP M277dw.

> * Is cups-browsed installed? If yes, which version?

I tested both with and without cups-browsed 1.28.7-1.

Test methodology for each of the 8 attempts listed here (I'm using an
expendable test machine, do not do these steps unless you are willing
to lose manual CUPS configuration):

sudo apt purge cups-browsed cups-daemon
sudo rm -fr /etc/cups
sudo apt install cups cups-core-drivers cups-daemon cups-browsed-
(optionally) Configure printer: gnome-control-center, Printers, Unlock,
             Add..., wait, click on the single printer that appears, Add
(optionally) sudo apt install cups-browsed
gedit
Try to print

GTK 3.24.24-4 (status quo in bullseye)
======================================

Repeating my previous test results for reference:

                                    | cups-browsed installed |
                                    |    no      | yes       |
    --------------------------------|------------|-----------|
    printer manually configured   no|unavailable | works     |
                                 yes| works      |duplicated |
    --------------------------------|------------|-----------|

GTK based on merge request 6 (full backport from 3.24.29)
=========================================================

                                    | cups-browsed installed |
                                    |    no      | yes       |
    --------------------------------|------------|-----------|
    printer manually configured   no| works      | works     |
                                 yes| works      | works     |
    --------------------------------|------------|-----------|

With no configuration and no cups-browsed: One printer appears in the
GTK dialog, labelled HP_Color_LaserJet_MFP_M277dw_xxxxxx_. It is not
listed in /etc/cups/printers.conf. Printing is successful.

With cups-browsed only: One printer appears, labelled
HP_Color_LaserJet_MFP_M277dw_xxxxxx_.
It is listed in /etc/cups/printers.conf, labelled as having come from
cups-browsed. It prints successfully.

With manual configuration only: One printer, HP-Color-LaserJet-MFP-M277dw.
It appears in /etc/cups/printers.conf. Printing is successful.
(This is actually better than the Qt app featherpad, which displays two
printers in this situation.)

With both: Same as with manual configuration only.

GTK based on merge request 9 (Daniel's minimal backport)
========================================================

                                    | cups-browsed installed          |
                                    |    no      | yes                |
    --------------------------------|------------|--------------------|
    printer manually configured   no| works      | works              |
                                 yes| works      | duplicated         |
    --------------------------------|------------|--------------------|

With no configuration and no cups-browsed: One printer appears in the
GTK dialog, labelled HP_Color_LaserJet_MFP_M277dw_xxxxxx_. It is not
listed in /etc/cups/printers.conf. Printing is successful.

With cups-browsed only: One printer, HP_Color_LaserJet_MFP_M277dw_xxxxxx_,
where xxxxxx is a unique ID taken from its MAC address. It is in
/etc/cups/printers.conf. Printing is successful.

With manual configuration only: One printer, HP-Color-LaserJet-MFP-M277dw.
It appears in /etc/cups/printers.conf. Printing is successful.

With both: both of the printers mentioned above appear in the GTK dialog
and in /etc/cups/printers.conf. Only the first one printed successfully:
the second logged "NO_DEST_FOUND".
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.