Chapter 12
-
Upload
phailin-suttikul -
Category
Documents
-
view
25 -
download
0
description
Transcript of Chapter 12
![Page 1: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/1.jpg)
Guide to Linux Installation and Administration, 2e 1
Chapter 12
Printing in Linux
![Page 2: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/2.jpg)
Guide to Linux Installation and Administration, 2e 2
Objectives
In this chapter, you will:• Configure and use the traditional Linux printing
architecture • Understand the Common UNIX Printing System
(CUPS) • Print files from different applications • Locate and relieve system bottlenecks• Manage networked printing resources
![Page 3: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/3.jpg)
Guide to Linux Installation and Administration, 2e 3
Using Traditional Linux Printing
• The traditional Linux printing architecture is called LPRng and is based on the system developed for BSD UNIX
• LPRng printing allows multiple users to print files at the same time to either local or networked printers
![Page 4: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/4.jpg)
Guide to Linux Installation and Administration, 2e 4
The Printing Process
• Printer definitions, or print queues describe the type of printer and the features to be used when something is printed on it
• The file submitted for printing is called a print job• The print job is processed by a print filter• After sending the print job through a print filter,
the printing utility stores the print job in a print spool directory
• The print server program, lpd, keeps track of all the print jobs in all the print queues on the system
![Page 5: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/5.jpg)
Guide to Linux Installation and Administration, 2e 5
A Single Print Queue Can Refer to Multiple Physical Printers
![Page 6: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/6.jpg)
Guide to Linux Installation and Administration, 2e 6
Many Print Queues Can Refer to a Single Physical Printer
![Page 7: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/7.jpg)
Guide to Linux Installation and Administration, 2e 7
Understanding Print Filters and Drivers
• Linux uses special programs called print filters• A Linux print filter converts documents or images
into a format that the printer can use
![Page 8: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/8.jpg)
Guide to Linux Installation and Administration, 2e 8
Printer Languages
• A page description language is a special set of codes that determine the graphics elements, text font, and everything else about what appears on a printed page
• The most widely used page description languages are PostScript and Printer Control Language (PCL)
![Page 9: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/9.jpg)
Guide to Linux Installation and Administration, 2e 9
The Magic Filter
• Most Linux distributions use a “magic filter” that can convert documents into formats for many different printers
• The “magic filter” doesn’t generally allow Linux to use the specialized features of each printer
![Page 10: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/10.jpg)
Guide to Linux Installation and Administration, 2e 10
Configuring Local Printer Definitions
• A local printer is a printer directly attached to your computer
• Define one or more printers before you can print documents
![Page 11: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/11.jpg)
Guide to Linux Installation and Administration, 2e 11
Reviewing printcap
• Each LPRng printer definition is created as a print queue entry in the /etc/printcap configuration file
• To use a local printer, you must provide the appropriate Linux device name when you configure the printer
• The format of a printcap entry consists of a print queue name, followed by a series of two-character option codes that apply to that printer
![Page 12: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/12.jpg)
Guide to Linux Installation and Administration, 2e 12
Configuring printcap Graphically
• Several graphical tools can create basic printcap entries:– Printer Configuration Tool printconf-gui in Red Hat
Linux– YAST utility in SuSE Linux– Webmin in Caldera OpenLinux
![Page 13: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/13.jpg)
Guide to Linux Installation and Administration, 2e 13
Defining the Printer Name and Type in the printconf-gui Utility
![Page 14: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/14.jpg)
Guide to Linux Installation and Administration, 2e 14
Selecting a Printer Driver in printconf-gui
![Page 15: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/15.jpg)
Guide to Linux Installation and Administration, 2e 15
The Main Window of printconf-gui
![Page 16: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/16.jpg)
Guide to Linux Installation and Administration, 2e 16
Selecting the Print System to Configure within the KDE Control
Center
![Page 17: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/17.jpg)
Guide to Linux Installation and Administration, 2e 17
Selecting a Printer in the KDE Printer Manager Wizard
![Page 18: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/18.jpg)
Guide to Linux Installation and Administration, 2e 18
Reviewing Printer Driver Settings in KDE
![Page 19: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/19.jpg)
Guide to Linux Installation and Administration, 2e 19
Managing Printers in the KDE Control Center
![Page 20: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/20.jpg)
Guide to Linux Installation and Administration, 2e 20
Printing Remotely Using lpd
• Define a printer on your system that refers to the remote computer and a print queue on the remote system
• The lpd daemon on your computer communicates with the lpd program on the remote computer, transferring the print job
![Page 21: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/21.jpg)
Guide to Linux Installation and Administration, 2e 21
Printing to a Remote Printer Using lpd
![Page 22: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/22.jpg)
Guide to Linux Installation and Administration, 2e 22
Defining a Remote lpd-based Printer in printconf-gui
![Page 23: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/23.jpg)
Guide to Linux Installation and Administration, 2e 23
Defining a Remote lpd-based Printer in KDE
![Page 24: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/24.jpg)
Guide to Linux Installation and Administration, 2e 24
Understanding the Common Unix Printing System
• The Common UNIX Printing System (CUPS) provides a new architecture for Linux and UNIX printing
• CUPS lets users and system administrators browse the network to find and print to networked printers and other devices
• CUPS lets system administrators manage printer definitions and print jobs across the network
![Page 25: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/25.jpg)
Guide to Linux Installation and Administration, 2e 25
Configuring Printers within CUPS
• The cupsd print server daemon uses HTTP protocol and accepts requests and processes print jobs sent over the network
• The cupsd print server daemon manages printers using a Web browser interface
• The CUPS architecture uses network port 631 to communicate between CUPS-enabled print servers
![Page 26: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/26.jpg)
Guide to Linux Installation and Administration, 2e 26
The Main Page of the CUPS Browser-Based Interface
![Page 27: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/27.jpg)
Guide to Linux Installation and Administration, 2e 27
The Printers Page in the CUPS Web Interface
![Page 28: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/28.jpg)
Guide to Linux Installation and Administration, 2e 28
Configuring an Existing Printer in CUPS
![Page 29: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/29.jpg)
Guide to Linux Installation and Administration, 2e 29
Setting up CUPS Classes
• CUPS class is a group of printers to which a user can submit a print job
• Whichever printer within the class is first available will be used to print the job
![Page 30: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/30.jpg)
Guide to Linux Installation and Administration, 2e 30
The Classes Page within the CUPS Configuration
![Page 31: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/31.jpg)
Guide to Linux Installation and Administration, 2e 31
Printing Files
• You can print files– from a command line– from a specialized graphical tool– from any graphical application
![Page 32: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/32.jpg)
Guide to Linux Installation and Administration, 2e 32
Printing from a Command Line
• The basic printing command is lpr• The lpr command is used for printing to both
LPRng and CUPS-based printers• Command options for lpr apply to a specific print
job, not to all print jobs sent to the printer
![Page 33: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/33.jpg)
Guide to Linux Installation and Administration, 2e 33
Command Options for lpr
![Page 34: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/34.jpg)
Guide to Linux Installation and Administration, 2e 34
lpr Options Supported by CUPS
![Page 35: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/35.jpg)
Guide to Linux Installation and Administration, 2e 35
lpr Options Supported by CUPS
![Page 36: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/36.jpg)
Guide to Linux Installation and Administration, 2e 36
Printing from Graphical Applications
• You typically print from a graphical application by choosing Print from the File menu
• Graphical applications rely on the lpr utility• You can print to a file• Gnome and KDE applications build upon a
standard dialog box
![Page 37: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/37.jpg)
Guide to Linux Installation and Administration, 2e 37
The Print Dialog Box in Gnumeric
![Page 38: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/38.jpg)
Guide to Linux Installation and Administration, 2e 38
The Print Dialog Box in KWord
![Page 39: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/39.jpg)
Guide to Linux Installation and Administration, 2e 39
The Print Dialog Box in Netscape Communicator
![Page 40: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/40.jpg)
Guide to Linux Installation and Administration, 2e 40
Managing the Printing Environment
• A system administrator manages printing• The system administrator takes care about
printer supplies and solves printer-related problems
![Page 41: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/41.jpg)
Guide to Linux Installation and Administration, 2e 41
Deciding on Printing Policies
• A printing policy is a brief statement of rules describing how printing resources can be used and how printers will be managed
• A printing policy is a helpful document for any organization with more than two or three users who rely on the same printer
![Page 42: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/42.jpg)
Guide to Linux Installation and Administration, 2e 42
Using the lpc Utility
• The lpc utility is the printer control utility• The lpc command-line utility lets you control
LPRng or CUPS printing, specifying how print jobs are accepted and processed
• You must be root to use lpc• You can include an lpc command as a parameter
on the command line
![Page 43: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/43.jpg)
Guide to Linux Installation and Administration, 2e 43
lpc Commands
![Page 44: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/44.jpg)
Guide to Linux Installation and Administration, 2e 44
Using lpc to Control the Printing Process
![Page 45: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/45.jpg)
Guide to Linux Installation and Administration, 2e 45
Tracking Print Jobs
• To view the print jobs in the default print queue, the lpq command is used
• The lprm command deletes a print job from a queue
![Page 46: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/46.jpg)
Guide to Linux Installation and Administration, 2e 46
Using Graphical Print Management Utilities
• You can use two KDE graphical utilities to manage printing:– KDE Print Job Viewer– KLpq program
![Page 47: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/47.jpg)
Guide to Linux Installation and Administration, 2e 47
The KDE Print Job Viewer
![Page 48: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/48.jpg)
Guide to Linux Installation and Administration, 2e 48
The KLpq Printing Manager
![Page 49: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/49.jpg)
Guide to Linux Installation and Administration, 2e 49
Managing CUPS Print Jobs in a Browser
![Page 50: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/50.jpg)
Guide to Linux Installation and Administration, 2e 50
Summary• The traditional Linux printing architecture is called
LPRng and is based on the system developed for BSD UNIX
• Printers are typically connected locally to either a parallel or serial port
• A system administrator creates printer definitions, which act as print queues
• Printer definitions are stored in /etc/printcap and can be created using printconf-gui or other text-mode or graphical tools
• Users submit print jobs to a named print queue using either the lpr command or a graphical dialog box
![Page 51: Chapter 12](https://reader031.fdocuments.net/reader031/viewer/2022020308/56812a46550346895d8d819a/html5/thumbnails/51.jpg)
Guide to Linux Installation and Administration, 2e 51
Summary• The data that a user submits as a print job is
processed using a print filter, which converts raw document data into a format a printer can understand, such as PCL or PostScript
• A printing policy informs users of how they can use printing resources and what they can expect from the system administrator who manages the printers
• The Common UNIX Printing System (CUPS) provides a new architecture for Linux and UNIX printing
• Print jobs waiting to be printed on a system using CUPS can be managed using the CUPS browser-based interface