Linux Printing Chapter 14
Jan 03, 2016
Linux Printing
Chapter 14
Linux Printing
• Configuring a local printer
• Configuring a remote printer
• Traditional UNIX printing
• CUPS web Interface
• CUPS on the command line
• Integration with Windows
Printing with CUPS
• The role of printing– Receive print job from application– Get it to the appropriate queue– Format it for printing
LPR / CUPS / IPP
• LPR & LPD are the traditional Unix/Linux printing systems– Used the Line Printer Daemon for the server – Line Pinter Remote for the client end
LPR / CUPS / IPP
• CUPS– Common UNIX Printing System is a cross
platform print server built around IPP
• IPP – Internet Printing Protocol (based on http)
LPR / CUPS / IPP
• CUPS– Contains numerous standard printer drivers– Cross platform – Linux, Windows, & Mac OS X– Supports
• LPD/LPR, http, SMB, and JetDirect protocols
IPP Project
• The IPP project began in 1996 when Novell and several other companies decided to design a protocol for printing over the Internet
• IPP is capable of determining:– the capabilities of a printer– Status of a printer– Status of a print job– As well as submitting and cancelling printjobs
Getting ready for CUPS
• The following packages need to be installed for CUPS printing:- CUPS- System-config-printer (optional)- Kdebase (provides optional kprinter)
Starting CUPS
• To start CUPS– /etc/rc.d/init.d/cups start
• To set CUPS to auto start in Multiuser mode– /sbin/chkconfig cups on
Configuring a local printer
• The fastest way to add a printer is to use the “system-config-printer” command
• This will bring up Printer Configuration
Adding a new printer queue
Adding a new printer queue
• Queue name– The name needs to start with a letter and contains no
spaces– Queue description is optional but a good idea
• Queue Type– By default this will be set to “Locally-connected” – LPT1 port will be displayed as /dev/lp0– USB ports will be displayed as /dev/usb/lp0
• They appear as Line printers inder the USB directory
Adding a new printer queue
• Printer Model– Standard printers can be chosen from a list of
manufacturers and models– If a printer is not listed, check to see if there is
a printer that can be emulated
• Finish
Configuring a Remote Printer
• CUPS allows you to connect to a printer over the network and manipulate the configuration or check its status.
• CUPS runs on port 631– To connect to a host you will need to
reference the port.– To connect to your local port you will need to
use your browser to get to http://localhost:631
Admin of a remote printer
Admin of a remote print server
LPR/LPD printing
• Command based printing uses the “lp” or “lpr” command.– “lp memo.txt” will send the memo.txt file to the
default printer– To specify a printer use the “-d” command
• ‘lp –d colorlaser memo.txt”
LPR/LPD printing• “lpstat” is used to display information
about a printer’s queue
• Each print job is given a job number – you can use the “cancel” command to remove them from a queue– “cancel 15”
• This is also availablethrough the browser
CUPS on the Command Line
• lpinfo– Displays the available drivers – Try combining this with a grep search to
minimized the list – lpinfo | grep “Brother”
• Lpadmin – Add, modify or configure printers – Add: “lpadmin –p colourlaser –m hp4150c.ppd.gz
• Adds an HP 4150C printer called colourlaser
CUPS Files & Services
• /etc/cups/printers.conf– Printer information
• /usr/share/cups/model– Printer drivers
• /etc/cups/cupsd.conf– CUPS configuration
• /sbin/service cups– Cups daemon
KDE Print Manager
• Kprinter – GUI manager
Microsoft Integration
• Printing from Windows– Requires SAMBA (Chapter 23)– Printers are shared and Windows 2000 and
later printers can print to the Linux printer via IPP
• Printing to Windows– Linux treats a Windows IPP printer as any
other printer
Linux Printing
• Configuring a local printer
• Configuring a remote printer
• Traditional UNIX printing
• CUPS web Interface
• CUPS on the command line
• Integration with Windows
Today’s Task
• Install CUPS and get a printer installed
• Test your install by printing to file or getting your document to show up in the queue