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
Symantec Backup Exec 12 and Backup Exec System Recovery 8 deliver industry leading Windows data protection and system recovery. Download this whitepaper to find out the top reasons to upgrade and how to get continuous data protection and complete system recovery.
Data and system loss — from a hard drive failure, malicious attack, natural disaster, or simple human error — can happen anytime. Don’t leave your business vulnerable. Make sure you have a secure recovery strategy in place. Symantec's latest backup and system recovery technology can efficiently restore critical applications, individual emails and documents and even restore your entire system in minutes in the event of a loss.
Businesses face a growing challenge to ensure that the IT environment is properly protected. Backup Exec 12 integrates with other applications in the Symantec family of products, to complement your current data protection strategy, keep your data securely backed up and make it recoverable when you need it most.







