Table of Content

Weight: 2

Description: Candidates should be able to manage print queues and user print jobs using CUPS and the LPD compatibility interface.

Key Knowledge Areas:

  • Basic CUPS configuration (for local and remote printers)
  • Manage user print queues
  • Troubleshoot general printing problems
    Add and remove jobs from configured printer queues

Terms and Utilities:

CUPS configuration files, tools and utilities
/etc/cups/
lpd legacy interface (lpr, lprm, lpq)

drilldown 4 category

  • physical
    plugin, turn on, cable connected
    test printer using /dev/device file
    try from diff computer or diff os
  • network
    ping remote host if printer connected to one
    check network connection
    printer shared correctly, permission
  • software
ps auxw|grep lpd # running
/etc/rc.d/init.d/lpd restart # if stopped

try diff software app
printer driver updated
Ghostview to check GhostScript's filter setting
  • configuration
/etc/printcap format, entry , logging files
permission
spool space

ps auxw |grep lpd

/etc/rc.s/init.d/lpd restart

/etc/printcap config file

quiz

your computer links directly to a network printer, you have checked printer for any physical problem but still cannot print to it.

which initial checked should you perform to determine weather a network fault is causing the problem?

V to ping printer
V check network cable is securely connected
X try to ping remote host
X check lpd is currently running as a process

you cannot print, already tested for physical and network related problem.
which checks should you perform to identify a possible software related problem?
X try sending a file to printer by addressing is directly using /dev/device file
V check that print filters are properly configed
V try printing from other application 
X ensure that ldp is turned off

lpc as root

manage print queue

lpc # root
lpc status # any users

lpc status lp:

result
if queuing enabled
if printing enabled
number of entries in spool

printer status

disable printing, still can submit job but not print
disable queuing, already submitted job will be printed but no new job accepted

lpc disable 

lpc disable lp # disable printer lp
lpr manual.ps
lpc start|stop lp0 # start/stop queue lp0

lpc up lp0 # enable both queuing and printing
lpc down lp0 Printer lp0 offline for servicing

lpc quiz

how printer respond if disable queuing process?

V stop accept jobs but finish printing existing jobs in queue 
X stop accept jobs and remove any current jobs from queue 
X continue to accept jobs but not print them 
X stop accept jobs, stop print and leave existing jobs 
place printer lp0 for service , which cmd to disable printer and queuing, and message ?

X lpc status lp0 Printer lp0 offline for servicing 
X lpc up lp0 xxx
X lpc stop lp0 xxx
V lpc down lp0 xxx

lpc status|restart|abort|clean|help|topq

idenfity valid lpc commands:

V lpc ebanle
X lpc on 
V lpc start
X lpc off
V lpc status 

printer setting

/etc/printcap
/var/spool

printer setting quiz

identify correct statements about lpd 

X /bin used to spool jobs before printing
V a single line in /etc/printcap identify a single printer
V lpd print system is collection of config files and apps
X turn off executable permission for printer command 
V print cmd in /bin
V /dev store representation of physical print device

CUPS

  • std printer system to accommodate variety of printers
  • Common UNIX Printing System
  • free sfotware
  • replaces LPD/LPR/LPRng

4 parts

  • printer spooler, queues jobs and loads docs to buffer area
  • scheduler, IPP internal printing protocol over HPPT/1.1 to handle request on each printer server, also web interface to manage jobs and config
  • filter system , convert daat to printer-friendly format to process doc in variety of formats
  • backend system, send job data to print device , enables printing over parallel, serial, USB ports and over network via diff protocol

CUPS web
http://localhost:631

CUPS CLI

/usr/sbin/lpadmin -p options
-c printer class, create it if not existing
-D extra desc
-E enable a printer to accept a print job
-i interface script , only if no other driver is available causes will disabled all filtering for a printer
-L location desc
-m model /usr/share/cups/model in PPD format , list all models by lpinfo -m
-P local PPD driver
-r remove printer from model
-v set Uniform Resource Identifier URI

/usr/sbin/lpadmin -p printer -E -v devicename -m ppd

/usr/sbin/lpadmin -p DeskJet -E -v parallel:/dev/lp1 -m deskjet.ppd

[cupsdisable|cupsenable] [-E] [-c] [-h server[:port]] [-r reason] destination(s)
[cupsaccept|cupsreject] [-E] [-c] [-h server[:port]] [-r reason] destination

CUPS quiz

which cmd for managing printers can you run if not logged as root?

X enable
V cupsaccept
X reject 
V cupsenable and cupsdisable
V cupsreject 

which print-related files and directories in linux are correct:
V print cmds stored in /bin
X entry in /etc/printcap using hyphens - 
X physical printer devices are represented in /bin
V docs to be printed are contained in /var/spool

as root want to accept all jobs sent to specified destination 
V cupsaccept
X lpadmin -p 
X cupsenable
V accept

many people in office problem printing to a remote network printer, how to check if printer config is correct?

V check each virtual printer is set to use correct physical device
X ping remote host 
V ensure /etc/printcap file formatted correctly
X check network faults

remove all files not be printed from queue for lp2?
X lpc stop lp2
V lpc clean lp2
X lpc topq lp2
X lpc down lp2 Printer lp2 files being removed