Bug 232009 - gtk print dialog doesn't show LPR printers
gtk print dialog doesn't show LPR printers
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: gtk2 (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Matthias Clasen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-13 11:40 EDT by Dominik 'Rathann' Mierzejewski
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-07-07 16:48:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Don't disable LPR backend even if CUPS is found. (313 bytes, patch)
2007-03-15 08:31 EDT, Dominik 'Rathann' Mierzejewski
no flags Details | Diff

  None (edit)
Description Dominik 'Rathann' Mierzejewski 2007-03-13 11:40:01 EDT
Description of problem:
We have a central LPRng print server running on Solaris. Due to the fact that
CUPS doesn't show submitted jobs in queue, nor does it allow canceling them,
we're using LPRng on our Fedora workstations as well, which forward all jobs to
the central server.

Starting with Fedora 6, GTK print dialogs don't show any LPR printers anymore.

This concerns OOo, evince and yelp (probably anything that's using gtkprint).
None of these apps show lpr printers anymore (it used to work in FC5, but then
evince was using gnomeprint). In fact,
/usr/lib(64)/gtk-2.0/2.10.0/printbackends/libprintbackend-lpr.so doesn't get
loaded even though it's available, I checked with strace.

gedit does show those printers just fine. strace shows
/usr/lib(64)/libgnomeprint/2.12.1/modules/transports/libgnomeprint-lpr.so
getting loaded, so I assume gedit was compiled with gnomeprint instead of gtkprint.

Version-Release number of selected component (if applicable):
gtk2-2.10.8-1.fc6

How reproducible:
Always

Steps to Reproduce:
1. evince/oowriter
2. open any document
3. open print dialog
  
Actual results:
No printers are available, only print-to-file

Expected results:
printers listed in /etc/printcap should be listed

Additional info:
It used to work on FC5:
openoffice.org-writer-2.0.2-5.20.2
yelp-2.14.3-3.fc5
evince-0.5.1-4
gtk2-2.8.20-1
Comment 1 Dominik 'Rathann' Mierzejewski 2007-03-15 08:30:14 EDT
OK, I have a partial solution. Attached is a patch that enables LPR backend in
gtk2, but it only gives me "Print to LPR" entry and not the full printer list.
Confirmed to work with both CUPS and LPR.
Comment 2 Dominik 'Rathann' Mierzejewski 2007-03-15 08:31:43 EDT
Created attachment 150119 [details]
Don't disable LPR backend even if CUPS is found.
Comment 3 Matthias Clasen 2007-03-15 13:55:18 EDT
The string you are modifying there is the default value for a GTK+ setting.
There is no need to patch gtk+ for this, you can just set the value in your
rc file, either $HOME/.gtkrc-2.0 or /etc/gtk-2.0/gtkrc. Just adding the line

gtk-print-backends="pdf,cups,lpr"

near the top of the file ought to do it. 

Nothing I can do about the printer listing though, that is just the way the lpr
print backend works, and improved lpr support is not really something I am going
to have time for. I'd be happy to accept patches though.
Comment 4 Dominik 'Rathann' Mierzejewski 2007-03-15 14:55:14 EDT
(In reply to comment #3)
> The string you are modifying there is the default value for a GTK+ setting.
> There is no need to patch gtk+ for this, you can just set the value in your
> rc file, either $HOME/.gtkrc-2.0 or /etc/gtk-2.0/gtkrc. Just adding the line
> 
> gtk-print-backends="pdf,cups,lpr"
> 
> near the top of the file ought to do it. 

Well, it's something I'd have to do on every machine. Any reason why it cannot
be done upstream?

> Nothing I can do about the printer listing though, that is just the way the
> lpr print backend works, and improved lpr support is not really something
> I am going to have time for. I'd be happy to accept patches though.

I see. This is a major regression for me, and it'll be tough to fix as I don't
know GTK code at all. Now whose bright idea was it to kill this functionality
when moving from gnomeprint to gtkprint, I wonder...
Comment 5 Matthias Clasen 2007-03-15 15:56:58 EDT
Fedora is using cups as its native printing system, so it is only natural that
we use the cups printbackend by default. 
Comment 6 Dominik 'Rathann' Mierzejewski 2007-03-16 06:35:54 EDT
I'm NOT suggesting disabling CUPS, I'm merely suggesting re-enabling LPR. What's
the problem with that?
Comment 7 Matthias Clasen 2007-03-16 09:25:14 EDT
Having multiple print systems show up in the print dialog is not something we
want by default. 
Comment 8 Matthias Clasen 2007-07-07 16:48:42 EDT
I'm going to close this bug, since I don't intend to work on it.

Feel free to file an enhancement request upstream in bugzilla.gnome.org
for making the lpr backend list printers. I'm not going to work on that either, 
but maybe somebody else wants to.

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