Linux printing made easy, Part 1
Welcome to the latest edition of Ask the Geek. As I mentioned in my last column, this week we are going to start a series on using the Common Unix Printing System (CUPS), which can introduce a universal printing solution to your network.
The world of printing for Unix/Linux has not changed much in a very long time. We still use good old lpd (the line printer daemon), we don't have support for IPP (Internet Printing Protocol), and we still don't have the ability to use many printers. But that situation is changing, and quickly. A new product is making inroads into the printing arena.
The CUPS software provides a way for Unix/Linux users to manage printing in an efficient and reliable manner. It natively supports IPP and has interfaces for LPD, SMB (Server Message Block, i.e., printers attached to Microsoft Windows), and JetDirect. CUPS can provide network printer browsing and use PostScript printer description (PPD) files. In short, with CUPS you can run a printer on a Linux machine as easily as they can on a Windows machine, but with the power of Linux.
CUPS runneth over
That said, let's get our hands dirty. First, we need to acquire CUPS. If you're running Mandrake 7.2, you already have it. (Yes, a shameless recommendation; it's what I run on my home machine.) If you are running another distribution, however, you'll need to download it (see Resources for the distribution site).
Once you've downloaded CUPS, you'll need to remove your old printing software. I'll explain this process using a machine running Red Hat 6.2 as an example. On such a machine, you must remove lpr, printtool, and rhs-printfilters before you install CUPS. You will want to keep these packages handy, though, in case CUPS doesn't work for you. If CUPS isn't your cup of tea, you can reinstall the packages and continue to be productive.
To remove these packages, type:
rpm -e lpr printtool rhs-printfilters
Then, install CUPS by typing:
rpm -ivh cups-1.1.4-linux-2.2.14-intel.rpm
Be aware that your filename may differ slightly.
CUPS is now installed. You should see the following message:
cups: scheduler started
This lets you know that CUPS is running and awaiting print jobs.
You can administer CUPS either at the command line or via a Web-based administrator. We will start by adding a printer from the command line interface. As the root user, type:
/usr/sbin/lpadmin -p LaserJet -E -v parallel:/dev/lp0 -m laserjet.ppd
The above lpadmin syntax performs the following tasks:
- Adds a printer called LaserJet (
-p) - Enables the printer to be used (
-E) - Sets the device and device type to use (
-v) - Uses the driver/PPD file
laserjet.ppd(-m)
Since we're at the command line, the quickest way
Essential JavaFX
Get started building rich Web apps quickly with an introduction to the power of JavaFX key features -- scene node graphs, nodes as components, the coordinate system, layout options, colors and gradients, custom classes with inheritance, animation, binding, and event handlers.Enter now!
The Nomadic Developer
Consulting can be hugely rewarding, but it's easy to fail if you are unprepared. To succeed, you need a mentor who knows the lay of the land. Aaron Erickson is your mentor, and this is your guidebook. Enter now!












