PPD Download broken for printers found via browsing

Bug #52867 reported by Florian Pflug
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libgnomecups
Expired
Medium
libgnomecups (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

Hi

When browsing is enabled in cups, then the local cupsd reexports the printers found on the network. But not all requests to a printer are proxied by the local cupsd - the download of ppd files is an exception.

libgnomecups, however, tries to download the ppd file from the local cupsd, which fails, and then assumes that there is no ppd file, therefore presenting no options for the printer.

I patches libgnomecups by adding _gnome_cups_printer_get_ppd_host to gnome-cups-printer.c, and using that (instead of _gnome_cups_printer_get_host) in gnome_cups_printer_get_ppd.

_gnome_cups_printer_get_ppd_host look similar to _gnome_cups_printer_get_host but doesn't check go_directly_to_printer_when_possible - instead, it always parses the hostname out of the printer_uri. Since printer_uri is actually printer-supported-uri - which is used for the same purpose by original cups client library - my fix should make the behaviour of libgnomecups and libcupsys more similar.

Revision history for this message
Florian Pflug (fgp) wrote :

Arg. After posting this I found the "other" bugreport for this problem. But since my report included a way to fix it, I marked the other one as a duplicate of mine, altough he was first.

So, #50916 is now marked as a duplicate for this report.

Revision history for this message
Florian Pflug (fgp) wrote :

Hi

Here is the patch that fixes the problem for me.

Please do _something_ about this problem - it's a serious showstopper for anyone who wants to use printer browsing. And it's kind of embarrassing that everthing works flawlessly when using "kprinter", and breaks when using the gnome cups support :-(.

greetings, Florian Pflug

Revision history for this message
Peter Adolphs (futzilogik) wrote :

I think this bug should be fixed in the GNOME package. Have you looked for an upstream bug report at bugzilla.gnome.org?

http://bugzilla.gnome.org/show_bug.cgi?id=170673 looks relevant to me

Revision history for this message
Florian Pflug (fgp) wrote :

I'll add my patch as an attachment to the gnome bug #170673 - but as this bugreport was submitted 2005-03-17 (!), I'm not too confident that they'll fix this soon.

Since ubuntu (or debian - don't know if the libgnomecups packages of debian and ubuntu differ) already includes custom patches to libgnomecups, it'd be nice if a custom patch was added for this problem if the gnome people don't fix it within the next few weeks.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug and patch. Martin, you probably know that code better, reassigning to you for opinion on the patch

Changed in libgnomecups:
assignee: nobody → pitti
Revision history for this message
Florian Pflug (fgp) wrote :

I just realized that my patch actually only fixes the gnome-cups-manager,
but not the printer dialog in gnome applications - at least not in firefox.

On a related note - I posted the same information to the gnome bugtracker
(http://bugzilla.gnome.org/show_bug.cgi?id=170673), and was informed
that libgnomecups is currently unmaintained :-(

So, it guess it's up to either the ubuntu or debian package maintainers
to fix this :-(

Revision history for this message
Martin Pitt (pitti) wrote :

Has a patch, will apply soon.

Changed in libgnomecups:
importance: Untriaged → Medium
status: Unconfirmed → In Progress
Changed in libgnomecups:
status: Unknown → Unconfirmed
Revision history for this message
Martin Pitt (pitti) wrote :

This works very well, thank you!

 libgnomecups (0.2.2-5ubuntu1) edgy; urgency=low
 .
   * Add debian/patches/25_browsed_ppds.patch: Fix PPD retrieval for printers
     picked up with cups browsing. Thanks to Florian Pflug for the patch!
     Closes: LP#52867

Changed in libgnomecups:
status: In Progress → Fix Released
Changed in libgnomecups:
status: New → Invalid
Changed in libgnomecups:
importance: Unknown → Medium
status: Invalid → Expired
Revision history for this message
Martijn van Brummelen (martijn-brumit) wrote :

This bug still effects me. Im using a local ppd file as a workaround, but I would prefer to use the remote ppd file.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.