Rant: The Status of Linux Printing

Sun Nov 23 21:28:37 EST 2003

I decided to take on the daunting task of printing under Linux. Even Linux trainers find it daunting to do sometimes as I've learn through experience, and this is what they tend to not cover during their classes.

Fate must have had it that I needed to configure a Linux printer from scratch. Being mollycoddled by Red Hat Linux and the various tools that it had to make life easier in the GUI sense was something I lacked. I was running Debian GNU/Linux, on the PowerPC platform, tracking unstable (Sid).

Logically thinking about it, I presumed that we would be using CUPS - the Common UNIX Printing System. So I got the software via Debian's wonderful tool apt-get:

apt-get install cupsys

It installed some software, and resolved the dependencies and quite possibly removed lpr - the line printer. I fired up my browser, and went to http://127.0.0.1:631/ the default port CUPS listens to. The interface wasn't too bad, it looked like something pulled out of Webmin, and working my way around it was fairly simple.

Wanting to install my USB based printer, I followed the online instructions. I must admit though that the first screen itself got me thinking a little - I was going to put in a path instead of a printer description! After properly configuring the printer, it could somehow not initialize the USB device.

At this point, I panicked a little. I went to make sure my kernel was compiled with USB printer support; it was, as a module. (in /usr/src/kernel-currentver/, do grep -i usb .config|grep -i print) So I fired up modconf and loaded the USB module, titled "printer". Now messages in /var/log/messages made sense - the device was "claimed", as opposed to earlier it got detected but not claimed.

Tried re-configuring CUPS, to no avail. At which point I trotted over to the newly installed Fedora Core 1. I clicked the icon that resembled a printer on the the bottom of the GNOME Panel, and it automatically mentioned that I had no configured printers. At which point it asked me if I'd like to configure a printer or not. If you say yes, you're prompted for a root password and automatically the Red Hat Printer Configuration pop-up (well, application) appears.

Adding a printer is with ease. Following the on-screen instructions, it didn't take long to get my USB-based, HP DeskJet 3325 printer configured and printing properly. At least this gave me an idea not to use CUPS on the Debian system, and instead use foomatic.

Back on Debian, I decided to search for foomatic - apt-cache search foomatic did it for me. Presented with several entries, the magic command:

apt-get install foomatic-bin foomatic-db foomatic-db-engine foomatic-filters foomatic-gui

All in one line, and several moments later, the packages were downloaded onto my system, and was presented for me to use. Thinking that I've already done enough things "manually" (yes, I could have used Synaptic), I decided to fire up the foomatic-gui package. To my dismay, it just sat there, and didn't do anything while attempting to detect my printer via the USB port.

Visiting the trusty Linux Printing website (http://www.linuxprinting.org/) I found some instructions as to how to get foomatic working relatively nicely for me. Firstly, I needed to know what "driver" to use for my printer. In Linux, they're not called drivers like in Microsoft-land - they're really print filters. Achieve this by running foomatic-configure -O | less.

Next, to configure it, foomatic uses the following configuration:

foomatic-configure -s <queue> <printer name> -c:file:<device> -p <printer ID> -d <driver name> -o <additional options>

For my DeskJet 3325, and being used to A4-styled paper, I did:

foomatic-configure -s lpd -n HP-DeskJet_3325 -c file:/dev/usb/lp0 -p HP-DeskJet_3325 -d hpijs -o PageSize=A4

How did I extract all that information just by running foomatic-configure -O? The extract of the relevant bit is:

 <printer>
    <id>HP-DeskJet_3325</id>
    <make>HP</make>
    <model>DeskJet 3325</model>
    <functionality>B</functionality>
    <driver>hpijs</driver>
    <autodetect>
    <!--no known parport probe information-->
  </autodetect>
    <drivers>
      <driver>hpijs</driver>
    </drivers>
  </printer>

That said, I think I was ready to print! I had a document opened in Xpdf, and for its print command, I just set it to lpr -P HP-DeskJet_3325 and all was well.

Is this Linux printing? I haven't used user-friendly Mandrake Linux or even SuSe in this comparison but it seems to be that printing under Linux, especially on Debian seems to be rather sad. Fedora seems to have gotten it right, with providing tools that exist.

As a constructive suggestion, maybe the Debian package maintainers might want to add a new option to tasksel - that explicitely supports printing. Otherwise, as part of the "desktop environment" it should get installed.


bytebot.net


Colin Charles <byte@aeon.com.my>, © 1996-2004