0% found this document useful (0 votes)
110 views

04 Printing

Cse 265: System and Network Administration focuses on printing and print services. Finance people want to centralize everything Others want to charge every expense. Centralized printing services can save money. How will printers be maintained? - who orders supplies and resupplies the printers?

Uploaded by

hradiya
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views

04 Printing

Cse 265: System and Network Administration focuses on printing and print services. Finance people want to centralize everything Others want to charge every expense. Centralized printing services can save money. How will printers be maintained? - who orders supplies and resupplies the printers?

Uploaded by

hradiya
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

CSE 265:

System and Network Administration


● Printing and print services
– Printing policies and architecture
– Printing terms
– Types of printers
– LPD, LPRng, CUPS
– Adding a printer
– Common printing software

Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
Print services
● People depend on print services
– for contracts
– for proofreading
– for quizzes
– for reading long material
that is less pleasant to
read on-screen
● Print is a utility
– It should always work

Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
Where should printers be located?

– Some want a printer on their


own desk
● Very convenient but expensive
– Some want to be able to print
to any printer, no matter where it is
● Flexible, able to borrow specialty printers as needed
– Finance people want to centralize everything
● A single high-speed printer, single high-quality printer, and
one color printer per building
– Others want to charge every expense
● Regardless of how much is out there, those who use it,
pay for it
Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
Real world
● People need to be able to print to any printer
they have permission to use
● Centralized printing services can save money
– Ten people who might otherwise buy slow, low-
quality personal printers for $50-200, without
support contracts, can buy a single high-quality,
fast shared printer with long-term maintenance
● Plus the sysadmin only has to support one printer
driver/printer rather than 10

Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
Print architecture
● How centralized will printing be?
– How many people will share a printer for general
printing?
– Who qualifies for a personal printer?
– How will they be networked?
● Networked printers require a central print-spool
– Also provides access control
– How will they be maintained?
– How will they be paid for?

Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
Print architecture (cont.)
– Who orders supplies and resupplies the printers?
● Are the printers re-supplied when they are out (and users
complain), or does someone visit them regularly?
– What kinds of printing technologies will be supported?
● Postscript/PCL
● Duplex printing
● Laser vs. InkJet
● LPD over IP/NT's SMB/AppleTalk/USB or parallel, etc.
– How will the printers be named?
● You don't want people printing to the wrong building or
wrong country (!) by mistake

Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
Print system architecture
– Peer-to-peer
● All hosts spool jobs directly to the destination printer
● Simplest, but all clients must know current printer IP/name
● Cannot route around broken printers
● Limited by printer spool memory
– Central funnel
● Hosts send print jobs to a central server which distributes
● Can convert formats
● Can collect per-page billing
● Can intelligently select printers
● Single place for printer drivers

Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
Printing terms
● spooler ● RIP
– Daemon that receives print jobs, – Raster image processor
stores, prioritizes, and sends – Accepts PDL input, generates
them sequentially to be printed bitmap appropriate for a
● PDL particular device
– Page Description Language, ● filters
usually device and resolution – Modify print jobs on their way
independent to a printer
– PostScript, PCL, PDF ● PostScript
● bitmap – Most common PDL – also a
– JPEG, TIFF, GIF full programming language

Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
Printing terms
● spooler ● RIP
– Daemon that receives print jobs, – Raster image processor
stores, prioritizes, and sends – Accepts PDL input, generates
them sequentially to be printed bitmap appropriate for a
● PDL particular device
– Page Description Language, ● filters
usually device and resolution – Modify print jobs on their way
independent to a printer
– PostScript, PCL, PDF ● PostScript
● bitmap – Most common PDL – also a
– JPEG, TIFF, GIF full programming language

Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
Types of printers
– Classified by connection interface
● Serial and parallel printers
– USB faster and the default today for personal printers
● Network printers
– Contain network interfaces
– Accept jobs via one or more printing protocols
● including via LPD, CIFS, IPP, HP JetDirect

– Classified by type of data


● PostScript is well-supported under Linux/UNIX
● Non-postscript printers require special software to convert
to unique PDL (vendor supplied, or ghostscript)

Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
LPD, LPRng, CUPS
Print Server Packages
● LPD is the old standard
– Not found on current distributions
● LPRng
– Designed for backwards compatibility with
Berkeley and System V printing systems
– Was common ages ago (default for Red Hat 7.3),
but is now replaced by...
● CUPS – Common UNIX Printing System
– Standard on modern distributions (our focus)

Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
client utility: lpr
– Invoked to submit a print job
●typically use -Pprinter to choose which printer, default
printer used when none is selected
% lpr -Phowler-lw -#2 thesis.ps
– All apps use it (even things like enscript and Acrobat)
– Checks /etc/printcap for info about printer
– Under LPD it creates two files in
/var/spool/lpd/printername
● One is a control file with handling info (like username)
● Second is data file
– Then tells lpd about file
Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
lpq and lprm
– lpq -Pprinter
● Examines the queue of jobs waiting to be printed on the
particular printer
● Shows the job id as well as owner, filename, size
– lprm jobid
● Deletes one or more jobs, erasing the stored data files
● Can delete with job id, or by username
● Typically must be on machine where job was generated
and must be same user (or root)
– Both work across a network (most of the time)

Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
lpc/lpadmin: make admin changes

● Can be used to
– Enable or disable queuing for a printer
– Enable or disable printing on a printer
– Remove all jobs from a printer queue
– Move a job to the top of a printer's queue
– Start, stop, or restart the lpd daemon
– Get printer status information
● lpadmin much more powerful

Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
filters
● Filters are typically shell scripts that run on
spooled data before sending to the printer
● Can
– Fix various non-printing sequences
– Write out accounting records
– Convert to printer-supported PDL
– Add banner pages

Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
CUPS
– Common UNIX Printing System
● Latest rewrite of the printing system
– Also supports secure printing (SSL, etc.)
– Implements IPP: Internet Printing Protocol (HTTP-
based)
– Supports load-balancing across a class of printers
– Supports automatic network configuration
– Standard in most Linux distributions

Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
Adding a printer in CUPS
● From command line:
– lpadmin -p fezmo -E -v socket://192.168.0.12 -m
laserjet.ppd
– lpadmin -p groucho -E -v parallel:/dev/lp0 -m pxlcolor.ppd
● From browser: http://localhost:631/admin
● From Red Hat/Fedora
– Command line: system-config-printer
– GUI: System->Administration->Printing

Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
CUPS Administration
– Provides a Web-
based interface for
administration
● http://localhost:631/

Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
HP Web Interface, Protocols

Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
Other common printing
software
– ghostscript
● Free PostScript interpreter to view PS files onscreen
● Also used to drive raster devices (cheap printers) by
rendering the PS in the format needed
● Powers front-ends like gv, ggv, KGhostView
– mpage
● Re-formats text or PostScript to have multiple logical
pages per physical page
– enscript
● Similar to mpage, also has nice page headers

Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
Viewing print files
● Ghostscript
– Front-ends like gv, ggv, KghostView
● Acrobat reader
● evince
● xpdf
● display (ImageMagick)

Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison
Resources
● http://www.linuxfoundation.org/collaborate/
workgroups/openprinting
– Successor to linux-printing.org
● http://www.cups.org/
– And if CUPS is installed, http://localhost:631/
● http://www.lprng.com/

Spring 2008 CSE 265: System and Network Administration ©2004-2008 Brian D. Davison

You might also like