71.3 Printer CUPS Admin
20200213
CUPS provides a convenient command line to administer printers. We can identify available printers with:
$ lpinfo -v
...
network dnssd://Brother%20HL-3040CN%20series._pdl-datastream._tcp.local/
network socket://192.168.178.26:9100
network lpd://BRN001BA9236DC1/BINARY_P1
...
List installed printers and the device URI.
Here’s an example using a socket:
Another example for a LPD (Line Printer Daemon) print server:
To add information about the Location and a Description of the printer:
To specify a PPD for the printer:
$ lpadmin -p lp4 -P /usr/share/ppd/Brother/brother_hl3040cn_printer_en.ppd
$ lpadmin -p lp5 -P LEXC750.PPD
The PPD file is copied into /etc/cups/ppd/lp5.ppd
, for
example.
Printer options (for a printer with a corresponding PPD in
/etc/cups/ppd/
can be viewed with:
Options can then be set with:
These options are placed in /etc/cups/lpoptions
. The same
options can be set using the web interface. The web interface is
indeed somewhat easier to use, and it modifies the PPD file directly
(e.g., /etc/cups/ppd/lp1.ppd
) rather than using the
/etc/cups/lpoptions
file!
Printer options can also be accessed directly from the command line when printing, if the printer’s PPD supports the option. For example, the HP LaserJet 4050 driver (from hp-ppd) supports n-up printing and watermarks:
Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0