SCIENTIFIC-LINUX-USERS Archives

June 2011

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Nico Kadel-Garcia <[log in to unmask]>
Reply To:
Nico Kadel-Garcia <[log in to unmask]>
Date:
Sun, 26 Jun 2011 17:38:09 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (86 lines)
On Sun, Jun 26, 2011 at 12:27 PM, Larry Linder
<[log in to unmask]> wrote:
> Hate to be a complainer, but stuff that has worked well for 20 years is now
> broken again.   This is the second time in less than a year.

Look again. lpr lives on top of Postscript, or ghostscript, and a
stack of printer drivers. Maintaining those has been a nightmare of
reverse engineering: I give enormous credit to the ghostscipt
maintainers over at Aladdin, and the weird flipping drivers used for
PCL and other proprietary printing languages who either do ont
publish, or randomly violate, their own specs.

The modern "lpr" command in Fedora and SL and RHEL derivates is no
longer part of the "lpr" or freeware "LPRng" suite of tools, it's a
backwards compatibility interface to CUPS, so it's really not the same
tool. I believe you that things are unstable in Fedora: that's what
Fedora is for, to work these details out: thanks for testing this soft
of thing for the rest of us.

> The script searches my data base and prints labels for parts in the inventory
> is broken again.  It uses awk to search the data base and prints the labels
> using lpr with a bunch of options.   In the last few weeks "lpr" has changed

The lpr command hands it off to CUPS: CUPS is famous for having a very
powerful, complex, and often utterly useless configuration interface.
(See Eric Raymond's essay, "The Luxury of Ignorance", and my comments
he thoughtfully quoted at the bottom.) The interface in SL 6, the
"system-config-printer" interface, is actually a lot better.

> and now pops up a GUI for a printer - prints a bunch of garbage to my screen
> and Pops a GUI - it also pick up the printer margins and host of other crap
> that I can't change from the GUI.   As a result the labels are off set by 1/2

Ahhhh. I think I see the issue. CUPS chose, years ago, to use the old
port 631, formerly used by lpr, for their configuration interface.
After all, they seemed to reason, it's available for printing and no
one will use lpr anymore, right? Unfortunately, some people do, and I
suspect your printing command is feeding it to the CUPS configuration
interface. Not deliberately: the setting can be enabled and disabled.
Use "system-config-printer" to do this, if Fedora hasn't changed
things lately.

> inch and now run over the end of the page.
> Looked on the internet and asked the question and there is no real answers - a
> bunch of dumb replys.

It's a problem. What format is the output from your awk cleverness in?
Flat text, which will then get transformed by the print drivers to
Postscript or PCL: or whatever for actual printing? There are some
fascinating, underdocumented, and long-standing problems with the
text->postscript tool not being manageable from the GUI.

If you can, get your output into PDF before feeding it to the printer.
It's fairly easy, and and *LOT* more robust than most other formats,
even flat text.

> On is a vector to the cups manual - no way to search it.   Can't spend a week
> reading all of it.
>
> I wish the people tinkering with the print stuff would quit working on stuff
> that has worked a long time.   A new rule is that "first do no harm".  Its ok
> to add new but don't clobber the stuff we depend on.

It's a historic problem with CUPS. They're pursuiing new features, and
the "do no harm" is unfortunately a real impediment to adding new
features or fixing things that have been broken for years but some
folks have implicitly relied on. (Been there, done that.)

> Does anyone have any idea of how to turn this stuff off or get back the
> real "lpr" utility.

A freeware version of the ancient "lpr" utility is in the "LPR"
package. That's been out of Fedora since... Fedora 9? You might be
able to find one compatible with SL 5 or older Fedoras, or recompile
one, but I don't recommend it for stability.

> So far I have a lot of time invested in this - by the way this is Sunday
> Afternoon.   That should tell you the urgency of the problem.  Monday we have
> a lot of stuff to ship - even if I have spend all night hand printing the
> labels.
>
> Thank You
> Larry Linder

Sorry about this.

ATOM RSS1 RSS2