After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 154172 - Duplex/No tumble settings are always selected for CUPS printer
Duplex/No tumble settings are always selected for CUPS printer
Status: RESOLVED FIXED
Product: gnome-cups-manager
Classification: Deprecated
Component: gnome-cups-manager
unspecified
Other All
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2004-09-30 16:03 UTC by thierry.thevoz
Modified: 2008-01-29 13:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Lookup the right options and default to non-duplexed (3.63 KB, patch)
2004-11-09 23:21 UTC, Jody Goldberg
committed Details | Review

Description thierry.thevoz 2004-09-30 16:03:33 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:
Comment 1 Andreas J. Guelzow 2004-09-30 16:30:13 UTC
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);


Comment 2 Andreas J. Guelzow 2004-10-10 12:56:25 UTC
It seems we previously had "sides" rather than "PageSize". Of course I don't
know whether that in fact used to work.
Comment 3 Andreas J. Guelzow 2004-10-11 22:46:04 UTC
of course gnome_print_cups_adjust_settings doesn't even seen to be called anymore.
Comment 4 Jody Goldberg 2004-11-09 23:21:11 UTC
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.
Comment 5 Andreas J. Guelzow 2004-11-10 03:43:50 UTC
On my system gnome_print_cups_adjust_settings is never entered (although I do
use cups).
Comment 6 Jody Goldberg 2004-11-10 04:02:44 UTC
andreas : what configuration are you using to test ?
I'm wondering if it's a feature of local vs remote printers.
Comment 7 Andreas J. Guelzow 2004-11-10 04:13:16 UTC
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.
Comment 8 Andreas J. Guelzow 2004-11-10 06:23:51 UTC
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.
Comment 9 Andreas J. Guelzow 2004-11-10 06:59:00 UTC
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.
Comment 10 Jody Goldberg 2004-11-10 16:59:06 UTC
andreas : I can not replicate that.
Comment 11 Jody Goldberg 2005-03-28 03:33:15 UTC
2.10.2 is more agressive about this and it's causing problems when coupled with
the failure associated with cups broadcast printers.
Comment 12 Kjartan Maraas 2006-12-02 13:58:45 UTC
The patch was commited it seems. Marking it as such. Is the bug still there?
Comment 13 Kjartan Maraas 2007-02-07 15:21:33 UTC
No reply. Closing.
Comment 14 Kjartan Maraas 2008-01-29 13:10:24 UTC
Moving all gnome-cups-manager bugs to new product. Filter on Kjartan's spring cleaning.