Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 603809 - GtkPrintUnixDialog (OpenOffice.org|evince) fails to use a user configured default cups printer (~/.cups/lpoptions)
GtkPrintUnixDialog (OpenOffice.org|evince) fails to use a user configured def...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gtk2 (Show other bugs)
5.5
All Linux
low Severity low
: rc
: ---
Assigned To: Cosimo Cecchi
desktop-bugs@redhat.com
:
: 509066 (view as bug list)
Depends On:
Blocks: 743405 807971 509064
  Show dependency treegraph
 
Reported: 2010-06-14 11:48 EDT by Matthew Carpenter
Modified: 2013-04-30 18:54 EDT (History)
8 users (show)

See Also:
Fixed In Version: gtk2-2.10.4-24, gtk2-2.10.4-29
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-08 00:11:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
backport of honouring ~/.cups/lpoptions etc. (6.27 KB, patch)
2010-06-17 09:36 EDT, Caolan McNamara
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0135 normal SHIPPED_LIVE Low: gtk2 security and bug fix update 2013-01-08 04:44:52 EST

  None (edit)
Description Matthew Carpenter 2010-06-14 11:48:49 EDT
Description of problem:

Most gnome applications will automatically have the default printer selected when you open the print dialogue but openoffice.org always defaults to the first printer in the list.


Version-Release number of selected component (if applicable):


How reproducible:
Always


Steps to Reproduce:
1. Assign BrowsePoll to a cups server in /etc/cups/cupsd.conf
2. Set default printer for user via System->Preferences->More Preferences->Default Printer
3. Open oowriter
4. Type something real quick and go to File->Print
5. The first printer in the list will be selected and not the default we just set.
  
Actual results:
Not using default printer


Expected results:
Default printer already selected.


Additional info:
Comment 1 Caolan McNamara 2010-06-17 06:55:30 EDT
You say "openoffice.org always defaults to the first printer in the list." 
Is there some reason you then state "Type something real quick and go to File->Print", why "real quick" ?
Comment 2 Caolan McNamara 2010-06-17 09:35:40 EDT
Let me see then, if one uses 
a) System->Preferences->More Preferences->Default Printer
that launches gnome-default-printer as the current user
as a non-root user
b) if you set a new default printer here, then that writes Default printername into ~/.cups/lpoptions

Now, there was bug 509064 in libgnomecups, I'm going to assume that libgnomecups-0.2.2-9 is installed and that bug is gone, i.e. that if you launch gnome-default-printer again it shows the just selected printer, so the working version of that is installed then...

I assume that if you launch e.g. gedit using the libgnomeprintui dialog then this printer is shown as the default, but if you launch e.g. evince that uses the gtk_print_unix_dialog (or OpenOffice.org which currently uses that dialog also), then this printer is not selected as the default.

i.e. we're talking about the gtk_print_unix_dialog dialog not honouring ~/.cups/lpoptions
Comment 3 Caolan McNamara 2010-06-17 09:36:30 EDT
Created attachment 424819 [details]
backport of honouring ~/.cups/lpoptions etc.
Comment 4 Matthew Carpenter 2010-06-17 10:01:03 EDT
(In reply to comment #1)
> You say "openoffice.org always defaults to the first printer in the list." 
> Is there some reason you then state "Type something real quick and go to
> File->Print", why "real quick" ?    

Sorry, just a term of expression poorly written from my stream of consciousness:-)  You can interpret that as "Write some random text for the purposes of having something to print."  Type it quick, take your time, it doesn't matter.

Sorry about that.
Comment 5 Matthew Carpenter 2010-06-21 11:42:15 EDT
(In reply to comment #2)
> Let me see then, if one uses 
> a) System->Preferences->More Preferences->Default Printer
> that launches gnome-default-printer as the current user
> as a non-root user
> b) if you set a new default printer here, then that writes Default printername
> into ~/.cups/lpoptions
> 
> Now, there was bug 509064 in libgnomecups, I'm going to assume that
> libgnomecups-0.2.2-9 is installed and that bug is gone, i.e. that if you launch
> gnome-default-printer again it shows the just selected printer, so the working
> version of that is installed then...
> 
> I assume that if you launch e.g. gedit using the libgnomeprintui dialog then
> this printer is shown as the default, but if you launch e.g. evince that uses
> the gtk_print_unix_dialog (or OpenOffice.org which currently uses that dialog
> also), then this printer is not selected as the default.
> 
> i.e. we're talking about the gtk_print_unix_dialog dialog not honouring
> ~/.cups/lpoptions    

That would be correct.  I tested and it does in fact fail with evince in the same way as in OpenOffice.  GEdit on the other hand works as expected.
Comment 8 RHEL Product and Program Management 2010-08-09 15:10:39 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 10 RHEL Product and Program Management 2011-05-31 10:27:36 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 11 RHEL Product and Program Management 2012-04-02 06:36:49 EDT
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.
Comment 12 Cosimo Cecchi 2012-04-09 15:04:25 EDT
The proposed patch has seen plenty of testing and the bug is very clear => ACK.

Looking more deeply at the code, I don't think backporting the part of the patch that reads user *options* is a good idea though, since it's not strictly related to this bug report.

On the other hand, if we decided to do it, I think we should also backport this [1] other patch, that touches the same options parsing code and adds a more correct translation from the options defined in lpoptions to the values supported by GTK.

Marek, what do you think?

[1] http://git.gnome.org/browse/gtk+/commit/modules/printbackends/cups?h=gtk-2-22&id=874ccc63a5751e076e77f2f8d2e53027b8301cee
Comment 13 Marek Kašík 2012-04-10 10:25:16 EDT
Hi,

I would prefer to backport the whole patch for reading user lpoptions. Having the other patch (Parse lpoptions correctly) would be also good.

Regards

Marek
Comment 15 Cosimo Cecchi 2012-04-23 12:22:04 EDT
*** Bug 509066 has been marked as a duplicate of this bug. ***
Comment 16 Cosimo Cecchi 2012-04-23 12:39:44 EDT
Built gtk2-2.10.4-24 with the fixes mentioned in this report.
Comment 29 errata-xmlrpc 2013-01-08 00:11:49 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0135.html

Note You need to log in before you can comment on or make changes to this bug.