topics that matter; ideas worth sharing

share a tip, submit a link, add something new

Linux printing made easy, Part 1

March 26, 2001, 10:12 AM —  LinuxWorld.com — 


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:

  1. Adds a printer called LaserJet (-p)
  2. Enables the printer to be used (-E)
  3. Sets the device and device type to use (-v)
  4. Uses the driver/PPD file laserjet.ppd (-m)



Since we're at the command line, the quickest way

I like it!
Post a comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
Resources
White Paper

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.

Webcast

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.

White Paper

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.

Free stuff
Featured Sponsor

Get a broad understanding of important regulations and how you can make sure your site is in adherence.





Learn how VeriSign SGC-enabled SSL Certificates can help improve site security and customer confidence in the free white paper, "How to Offer the Strongest SSL Encryption." In this paper you will learn the differences between weak and strong encryption and what they mean for your site's performance.

Get VeriSign's free white paper: "The Latest Advancements in SSL Technology" and learn about the benefits of strong SSL encryption, Extended Validation (EV) SSL and security trust marks and what these SSL offerings can do for your site.

Now with Extended Validation (EV) SSL available from VeriSign, you can show your customers that they can trust your site. Learn about EV SSL benefits in this free VeriSign white paper.

More Resources