LPIC-1 108.4: Printers and printing
CUPS with a PDF printer: printing, holding and canceling jobs, and debug logging.
Before you start
The lab creates user alice (password Lab-Pass-1) and installs
ipptool, which the check uses to read CUPS's job history. CUPS itself
isn't installed yet: that's task 1. Reset removes CUPS and the PDF printer
again.
Tasks
- Install
cupsand a PDF printer, and find it withlpstat -p. On Debian and Ubuntu, installprinter-driver-cups-pdfandcups-bsd; the first adds a printer namedPDFby itself. On the RHEL family,cups-pdfcomes from EPEL (dnf install epel-releasefirst) and adds no printer, so add one:lpadmin -p PDF -E -v cups-pdf:/ -m CUPS-PDF_opt.ppd. Asalice, print a text file to it (a job printed by root makes no PDF on the RHEL family); find the PDF it makes, and write the PDF's full path to/root/lab-answers/1. - Disable the printer with a reason, print two files, list them with
lpqandlpstat -o, remove one withlprmand the other withcancel, then enable it again. Also reject jobs on the printer and try to print; read the message, then accept jobs again. - Turn on CUPS's debug logging, print a file, and read what
error_log(orjournalctl -u cups) shows. Leave debug logging on.
Hints
lpstat -p -v;lp -d PRINTER file. The PDF lands in~/PDFon Debian and Ubuntu; on the RHEL family it goes to~/Desktop, or the home directory when there's no Desktop.lpinfo -m | grep -i pdflists the PDF printer's driver.cupsdisable -r "reason",cupsenable,cupsreject -r,cupsaccept;lpstat -p -l. On Debian and Ubuntu,lpqandlprmare in thecups-bsdpackage.cupsctl --debug-logging,cupsctl;/var/log/cups/error_log.