Printing with CUPS, Part 1 - Page 4

By  Carla Schroder | Jul 9, 2003
Page 4 of 4   |  Back to Page 1
Print ArticleEmail Article
  • Share on Facebook
  • Share on Twitter
  • Share on LinkedIn

Standalone Linux PC with Attached Printer

Run lpinfo to see a list of supported devices on your system:

lpinfo -v

network socket
network http
network ipp
network lpd
direct canon:/dev/lp0
direct epson:/dev/lp0
direct parallel:/dev/lp0
direct scsi
serial serial:/dev/ttyS0?baud=115200
[...]
direct usb:/dev/usb/lp0
direct usb:/dev/usb/lp1
[...]
network smb


OK, this is good – we can use any kind of physical printer connection. I have an old HP LaserJet 6L, the Unkillable Printer – this old thing just keeps on working. (Note: There is a free fix for some HP printers that develop paper feed problems, such as feeding too many pages; see here.)

This command installs the printer:

# /usr/sbin/lpadmin -p HPLaserJet -L powerpc -E -v parallel:/dev/lp0 -m laserjet.ppd

lpadmin -p sets the printer name. This can be anything (do not have duplicates, though).
-L sets the printer location. Again, this can be anything – make it something useful that tells where the printer is or what it is attached to.
-E enables the printer and makes it ready to receive jobs.
-v sets the deviceURI, which comes from lpinfo.
-m sets either an interface script or a PPD file, or it defines the "drivers."

Note that switches must be hyphenated individually; they cannot be combined.

While that was fun, installing printers via the CUPS browser-based interface, http://localhost:631/admin, tends to be a bit more enjoyable (although it is good to understand the lpadmin commands). The installation menus are self-explanatory. When you get to the menu for selecting the driver, I recommend choosing the Gimp-Print driver, if one is available.

An easy and interesting exercise is to install your local printer with different drivers (if more than one is available), then print and compare the test pages. (Be sure to delete each driver before installing a new one; don't try to install multiple drivers for the same printer.)

For PPD files obtained elsewhere, such as linuxprinting.org, see the handy-dandy PPD file tester – test 'em before trying to use 'em.

Notice how the CUPS Web interface stays synchronized with the command line. It might take a refresh or two, but it's possible to switch back and forth and not worry about conflicts.

In Part 2 we'll explore using CUPS with networked printers, including network-direct, and Windows servers and clients.

Resources

Easy Software Products
Linuxprinting.org
KDEPrint
PPD file tester

» See All Articles by Columnist Carla Schroder

Comment and Contribute
(Maximum characters: 1200). You have
characters left.
Get the Latest Scoop with Enterprise Networking Planet Newsletter
Helpful Links
  • Yankee Group Mobile WAN Optimization Report

    Mobile work continues to evolve. Your organization must keep up with the demands of its mobile workforce. This report introduces the concept of mobile WAN optimization and provides three case studies including RCM, PRTM and Einstein that highlight how this emerging technology can help IT departments achieve what previously appeared to be conflicting goals. Read >

  • Network Security Resources

    More threats than ever before pose a danger to today's enterprise network. Get the latest tips and intel on the newest risks in our guide to network security resources. Read >

  • Extreme Savings: Cutting Costs with WAN Optimization

    Did you know it's possible to cut IT costs without impacting day-to-day IT operations? In fact, when you download this whitepaper from Riverbed on cost-savings through WAN optimization, you'll discover how businesses of all different sizes have realized a return on investment in just a few months through significant hard cost savings in areas such as bandwidth reduction and IT consolidation. It's called Extreme Savings and its only from Riverbed. Read >