|
.comment: Happily In My CUPS
Getting Serious About PrintingIt came to pass that yesterday I absolutely had to print a document. Setting up printing under Linux is not a pleasant pastime. The semi-automatic printer configurators shipped with Linux distributions are unreliable, especially if you get a different printer -- Heaven help you if it's a brand new one (most of which are Winprinters, kind of like a toaster that prints, anyway) for which there is no driver support yet -- but the big problem is that the printing mechanism in Linux has always been a kind of afterthought. And it shows. Linux distributions for the longest time used a BSD-style print queue, which was a combination filter/spooler that through the kindly offices of GhostScript would take the PostScript output of most applications and convert it into something easily digested by whatever was attached to the parallel port. It worked reliably once it was set up, but setting it up was often maddening. Then some distributions branched off into LPRng, which is in my view an encoded acronym for "You Don't Need a printer." The BSD print arrangement could be understood with sufficient study, but with LPRng you're better off on a North Carolina beach with a metal detector, looking for treasure. Where configuring the BSD-style stuff would impart neurosis, LPRng can get you a new garment, one whose arms buckle in the back. Then there are the various print
engines that come with applications. WordPerfect has one, as does
StarOffice, as do some others. KDE2 apparently does, also, in that
there's a good big selection of .ppd files for various printers in
the kdesupport package, though KDE2 might as well point its
applications' printing efforts to And it was therefore early yesterday morning that I realized that I hadn't printed a thing since I upgraded my distribution many months ago. I set about making LPRng work with my LaserJet III-D with PostScript cartridge. Two hours later, it was time to consider other options. I'm glad I did. Email arrived a couple of weeks ago suggesting that I give CUPS a try. CUPS is the Common Unix Printing System, and it solves a multitude of problems. My guess is that it will become the Linux standard before long. (Yes, I said standard. And I expect a few dozen emails the gist of which are, "we don't need no steenkin' standards," to which I respond in advance: You may avoid growing up, but that doesn't mean Linux can't.) Mostly, CUPS works.
Setting It UpThere are several flavors of CUPS, a
free version that works if you're lucky and a pay-for version that
costs from a fair amount to a whole lot that works if you're unlucky.
That's because the free version comes with PostScript Printer
Description (.ppd) files, which are tantamount to printer drivers,
for Epson and Hewlett-Packard printers only. If your printer is one
of these or can be set to emulate one, then you're in business,
though it may be that not everything will work exactly as it should.
CUPS is one of those commercial/open source projects. No one knows
whether it, like the others, is likely to succeed commercially, in
that people can also develop for it for free. Hacking is possible:
For instance, moments ago I copied the .ppd files from kdesupport in
my kde source tree ( And it is the free version that I tried, though I can see how the enterprise would be quick to spring even $500 for the full circus -- you're going to pay an IT guy that much to set up LPRng (or, more likely, to learn that he can't, after which CUPS professional, a/k/a ESP Print Pro will be purchased anyway), and you're still up the creek if you change your printer configuration. CUPS makes setup and reconfiguration laughably easy. The free stuff is available at
the CUPs Web site in source
tarball and .src.rpm, plus binaries for a selection of platforms, including
several flavors of Linux (and packaged as .deb, .rpm, and tarball). I built
from source (pretty much) uneventfully on one machine here, and used the
Linux-2.2 rpm on another. In both cases installation was
unremarkable, though A caveat: CUPS overwrites whatever
miserable excuse for a print spooler you currently have, so if you
spent a week making it work and have developed affection for it and
the fact that it only prints one character per page, by all means
archive it someplace before you install CUPS. I took great delight in
doing Once it was installed properly (which
happened completely uneventfully with the rpm), I did
And had I read the docs a little more carefully, I would now have saved myself some time, because I didn't realize that it has more than just a commandline configuration utility, which like many such is a little obscure until you master it, after which it is probably quicker than any other configurator. This means that if you install CUPS for a living, you'll do it from the console, but otherwise you probably won't. Because I didn't pay enough attention
to the documentation, I downloaded and built QTCups and Kups, which
are, respectively, QT and KDE front ends for the program. (There are
similar programs for GTK and others as well.) Having gone to all that
trouble, I'm including screen shots of them. QTCups isn't as ugly as
it looks, unless you're still experimenting, as I am, in hope of
oneday making font anti-aliasing in KDE2 useful. Kups is attractive.
Both, as it turns out, are unnecessary (if you have a browser, which
in that you are reading this we can reasonably assume that you do).
Once CUPS is running, fire up a browser -- any browser, and in the
location space type Of some annoyance to me was the fact that the existing H-P drivers made no allowance for the existence of a PostScript printer, and I have a genuine H-P LaserJet PostScript cartridge. Yeah, I know that printing using the cartridge is for some reason actually slower, but I have the thing and would like to use it. (And, oddly, until yesterday StarOffice would only print to an actual PostScript printer, about which more in a minute.) Once a printer is added, you're told exactly that. Click on the printer name and you go to a screen that offers a number of options, one of which is configuring the printer (which do; it lets you tune things a little -- for instance, set the paper source and turn on duplexing if you have choices as regards those) and another of which is printing a test page (which also do, for obvious reasons). Then you're done.
Eureka!First thing I did after leaving configuration was to fire up Netscape and print a Web page. Netscape is notoriously cranky in these matters, but it worked without the slightest problem. Next test was StarOffice, which previously had refused to work unless the PostScript cartridge were installed. Again, no problem. (My test in this case was the document that I absolutely had to print.) KDE2 wouldn't print anything from any application, but I'm not terribly surprised by that. I suppose that with some fiddling it will -- and it certainly will if CUPS becomes the standard that it ought to be. I hesitate to characterize those who decide what goes into distributions, but I have heard that there were hamster-like squeaks and the faint aroma of elderberry in the air at their births. Adoption of CUPS would be a step toward the redemption that in some cases will be a long journey indeed. Once I was satisfied that CUPS was working to the extent that I wanted to keep it around (as if there were a choice), I added it to the services at startup. This can be done (as root, of course) with the KDE Sys-V Init Editor or with any distribution's daemon manager. And I could cross one off the list. Sound still doesn't work here, between the VIA Audio Codec and KDE2's artsd, and the font anti-aliasing remains a raging nightmare. There's still no first-class word processor. But getting the printer to work is progress. More than progress -- a sign of its coming maturity. The corresponding sign that it's still fresh and new will be achieved when I hear that the kdesupport .ppd files have been hacked into CUPS.
|