GNOME Bugzilla – Bug 154172
Duplex/No tumble settings are always selected for CUPS printer
Last modified: 2008-01-29 13:10:24 UTC
Please describe the problem: Printer settings dialog (typ. in Evolution) always defaults settings for my CUPS printer to Duplex/no tumble. There is no way to change this, even by removing the Duplex capability section from py PPD file. Here is the email exchange I had : Hello, I'm running CUPS with a HP 5550 printer. it is configured and running properly. Only one thing is disturbing me : evolution print dialog insists that Duplex is selected by default. Duplex default in CUPS is off (and everywhere else also). How can I setup libgnomeprint, so that Duplex is disabled by default? I thank you in advance! Thierry -- If you change what the ppd file says for your printer, that will change the default. Evolution *should* be remembering what you selected last time, this is: http://bugzilla.ximian.com/show_bug.cgi?id=46404 Regards, Owen -- Hello Owen, Thank you for your help! I also had tried to edit my printer's PPD file. I removed the whole section regarding duplex support. Unfortunately, this had no effect on the print dialog. The duplex options were always displayed (for this printer, generic print and PDF print), not sure why. Does libgnomeprint cache some information, or are the printer's capabilities always queried dynamically from CUPS and the PPD file? What happens if no duplex section exists? Anyway, I will try once more to change th PPD file. Just to be sure... I thank you in advance, and I wish you a good day! Thierry P.S: Overall, I fully agree this is an Evolution bug. Evolution should definitely remember the last printer settings. -- Hi Thierry, I think Owen wanted to say that this would change the default if there wasn't a bug in gnome_print_cups_adjust_settings. A short look into that function makes it clear that currently gnome-print will always start out with a default of duplex/notumble. Whatever you are doing with the ppd file. It's only a copy and past bug in that the wrong option identifier is used. It isn't clear to me though what the correct one should be. Please file a bug in bugzilla. Thanks Andreas Steps to reproduce: 1. Define a CUPS printer as default printer 2. Start Evolution, select a message, select File->Print 3. Click on the printer settings button : Duplex/No tumble is always selected Actual results: Expected results: Defaults from CUPS (Duplex is off) should be followed Does this happen every time? Yes Other information:
The exact location of the buggy code: in gnome-print-cups.c we have: gnome_print_cups_adjust_settings (GPASettings * settings, GnomeCupsPrinter *printer) { char *value; value = gnome_cups_printer_get_option_value (printer, "PageSize"); if (value != NULL) { gpa_node_set_path_value (GPA_NODE (settings), "Output.Media.PhysicalSize", value); } g_free (value); value = gnome_cups_printer_get_option_value (printer, "PageSize"); !!! This should _not_ be "PageSize" on the previous line !!! if (value != NULL) { if (strcmp("two-sided-long-edge", value) == 0) { gpa_node_set_path_value (GPA_NODE (settings), "Output.Job.Duplex", "true"); gpa_node_set_path_value (GPA_NODE (settings), "Output.Job.Tumble", "false"); } if (strcmp("two-sided-short-edge", value) == 0) { gpa_node_set_path_value (GPA_NODE (settings), "Output.Job.Duplex", "true"); gpa_node_set_path_value (GPA_NODE (settings), "Output.Job.Tumble", "true"); } if (strcmp("one-sided", value) == 0) { gpa_node_set_path_value (GPA_NODE (settings), "Output.Job.Duplex", "false"); } } g_free (value);
It seems we previously had "sides" rather than "PageSize". Of course I don't know whether that in fact used to work.
of course gnome_print_cups_adjust_settings doesn't even seen to be called anymore.
Created attachment 33618 [details] [review] Lookup the right options and default to non-duplexed This should fix the problem. If people could test it on their systems I'll get it into 2.8.2 before we branch on Fri.
On my system gnome_print_cups_adjust_settings is never entered (although I do use cups).
andreas : what configuration are you using to test ? I'm wondering if it's a feature of local vs remote printers.
We are running a cups server on each machine which hands some print jobs off to a central cups server for printing. My test machine knows one remote duplex printer and one local non-duplex printer.
Okay, my libgnomeprint was insisting to load the 2.7.1 modules even though it was 2.8.0.1. I persuaded it otherwise. Now the duplex setting is changed according to printer: the non-duplex printer has duplex selected, the non-duplex printer has it deselected.
okay after a bit more testing I find that the duplex printer (with name fac) has the correct settings. It seems to match the cups default duplex setting for that printer. The non-duplex printer (with name lp) has duplex sleected though while it should not. Stepping through the code of gnome_print_cups_adjust_settings it does correctly read that ther is no duplex from its ppd file. Somewhere on the way to the dialog things are changed.
andreas : I can not replicate that.
2.10.2 is more agressive about this and it's causing problems when coupled with the failure associated with cups broadcast printers.
The patch was commited it seems. Marking it as such. Is the bug still there?
No reply. Closing.
Moving all gnome-cups-manager bugs to new product. Filter on Kjartan's spring cleaning.