GTK print dialog does not allow printing and does not show options of a remote DNS-SD/Bonjour printer
Submitted by Till Kamppeter
Created attachment 224912 print-dialog-show-options-of-remote-dnssd-printers.patch
Original report to Ubuntu:
From CUPS 1.6.x on CUPS does not broadcast shared printers any more using its own method, leading to the fact that clients do not discover and make available printers on remote CUPS servers automatically any more. Now one has to explicitly add the printer on the client. To allow at least discovery of the server's printers, the server broadcasts the printer information via DNS-SD/Bonjour (using the Avahi daemon). Creating a queue on the client based on these broadcasts is easy, system-config-printer shows the server's host name under the discovered network printers and choosing this allows to use the shared CUPS printer. On the client we then have a raw queue (no local PPD/driver, we use the server's one) with a device URI like this:
One can print on this printer via the "lpr" command and one can display the options (defined in the PPD file on the server) with "lpoptions -l".
If one opens the GTK print dialog (for example in evince), the printer gets listed but it says "Getting printer information ..." infinitely and the "Print" button stays grayed out, making printing through the GTK dialog impossible.
This is a major problem as it prevents printing on printers shared between computers running CUPS 1.6.x.
The fix is simple and a patch is attached.
To reproduce: Take two Quantal machines, both need to run CUPS and Avahi, the client needs to run a desktop and have GTK applicatiuons installed. On the server create a print queue with system-config-printer or by simply plugging in a USB printer, do not create a raw (driverless) print queue. Share the printer ("cupsctl --share-printers" or "Server"/"Settings" in system-config-printer). On the client create a queue pointing to this printer, in system-config-printer click the "Add" button and in the printer setup wizard wait for the spinning icon to disappear, under the network printers choose the host name of the server and complete the wizard, you will not get asked for make, model, or driver. You will be able to print a test page and to browse the printer's options with system-config-printer. You also will be able to print from the command line or from KDE applications. If you try to print from GTK applications the queue displays in the dialog but is stuck with grayed "Print" button and "Getting printer information ...".
Patch 224912, "print-dialog-show-options-of-remote-dnssd-printers.patch":