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

Daniel Gröber dxld at darkboxed.org
Sat Feb 26 18:43:08 GMT 2022


Here are my test results:

TLDR:

- Printing via cups entry (be that cups-browsed or manual) always succeeds

- Printing via libgtk's fallback entry always fails

- Both proposed fixes work and succeed in removing the duplicate entry for
  cups-browsed, but not for a manually added printer with default name or
  when the user chooses a name that doesn't match the cups-browsed/libgtk
  mangling scheme.

Resultion: printing is still hell on earth :]



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

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

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

    cups-browsed                1.28.7-1

 * How many printers are physically present on your network?

    One Brother HL-L5100DN

 * Have you configured a printer queue in CUPS manually, or are you only
   using auto-detection?
 * What printer names appear in the GTK print dialog?
 * For each printer name that appears:

    With libgtk-3-0 =3.24.24-4 from bullsye, no cups, no browsed:

    	Brother-HL-L5100DN-series (prints garbage)

    With libgtk-3-0 =3.24.24-4 from bullsye and cups-browsed auto-detection:
    
        Brother-HL-L5100DN-series (prints garbage)
        Brother_HL_L5100DN_series (works)

    With libgtk-3-0 =3.24.24-4, cups manual config and default name[1]:

        Brother-HL-L5100DN-series (prints garbage)
        Brother_HL-L5100DN_series_ (works)

    With libgtk-3-0 =3.24.24-4, cups manual config and corrected name[1]:

        Note: with =3.24.24-4 the printer name has to be corrected to match
        the all dash version for the merging logic to trigger so that what
        we do here.

        Brother-HL-L5100DN-series (works)

  Note: I call the entry that appears without cups/browsed the "fallback
  entry". The libgtk code doesn't do any sort of print job
  formatting/filtering that I could find just sending whatever internal
  representation libgtk uses (probably PDF) towards the printer hoping for
  the best.


    
    With mr6.1 and cups-browsed auto-detection:
    
        Brother_HL_L5100DN_series (works)    
    
    With mr6.1, cups manual config and default name[1]:

        Brother_HL-L5100DN_series_ (works)
    	Brother_HL_L5100DN_series (Status: Rejecting jobs, won't print)

    With mr6.1, cups manual config and corrected name[1]:

    	Note: Here we use all underscores in the configured printer name to
    	make the merging logic trigger.

    	Brother_HL_L5100DN_series (works)

    With mr6.1, both cups manual and cups-browsed auto-config and corrected name[1]
        
        Brother_HL_L5100DN_series (cups manual, works)
        Brother_HL_L5100DN_series at brother-hl-l5100dn.local (cups-browsed, works)       



    With mr9.1 and cups-browsed auto-detection:
    
        Brother_HL_L5100DN_series (works)

    With mr9.1, cups manual config and default name[1]:

        Brother_HL-L5100DN_series_ (works)
        Brother_HL_L5100DN_series (prints garbage)

    With mr9.1, cups manual config and corrected name[1]:

    	Note: Here we use all underscores in the configured printer name to
    	make the merging logic trigger.

        Brother_HL_L5100DN_series (works)

    With mr9.1, both cups manual and cups-browsed auto-config and corrected name[1]

        Brother_HL_L5100DN_series (cups manual, works)
        Brother_HL_L5100DN_series at brother-hl-l5100dn.local (cups-browsed, works)


[1] About the cups default/corrected name:

cups puts a dash in HL-L5100DN and adds a trailing underscore to the
default name compared to cups-browsed auto configured name so merging of
the entries doesn't work if defaults are accepted.

Cups setup procedure:

    apt-get purge 'cups-*'; rm -rf /etc/cups
    apt-get install cups   (for cups-browse)
    apt-get install cups --no-install-recommends   (no cups-browsed)

Manually adding printer via cups webinterface:

        [Find New Printers]
     -> Brother HL-L5100DN series (Brother HL-L5100DN series (driverless))
     -> Name: Brother_HL-L5100DN_series_ (in default case)
     -> Make: Brother, Model: {current_make_and_model} - IPP Everywhere ^{TM}
     -> [Add Printer]

 * What printer names are listed in /etc/cups/printers.conf?

    For cups-browsed:
        <Printer Brother_HL_L5100DN_series>
    	<Printer Brother_HL_L5100DN_series at brother-hl-l5100dn.local> 
            (when manually configured printer would conflict)

    For manual config:
	<Printer Brother_HL-L5100DN_series_> (default)
        <Printer Brother-HL-L5100DN-series> (corrected for =3.24.24-4)
        <Printer Brother_HL_L5100DN_series> (corrected for mr{6,}.1)

--Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-gnome-maintainers/attachments/20220226/e9eb28a3/attachment.sig>


More information about the pkg-gnome-maintainers mailing list