GNU/Linux Desktop Survival Guide
by Graham Williams
Install a Printer
20190811 To install any printer, after connecting it by
USB, Ethernet, or WiFI, identify the printer in the list of available
printers using lpinfo's
$ lpinfo -v network http network lpd network https file cups-brf:/ network ipps network ipp network beh network socket direct usb://HP/Photosmart%20B110%20series?serial=CN13J3S5MQ05J8&interface=1 direct hp:/usb/Photosmart_B110_series?serial=CN13J3S5MQ05J8 direct usb://Brother/HL-3040CN%20series?serial=000J9J169344 network smb direct hpfax network dnssd://Photosmart%20B110%20series%20%68C6%5D._pdl-datastream._tcp.local/ network socket://192.168.178.28:9100 network ipp://HP4C68C6.local:631/ipp/printer
This list identifies the printers that are discovered. In this case two printers are connected via USB. One is a HP Photosmart B110 and the other is a Brother HL-3040CN. The HP printer is also available as a HP printer device (the entry with the hp: prefix).
The HP printer is also connected to the local network, either by Ethernet or WiFi and the three network entries identify alternative ways to connect to the printer via the network. The dnssd (Domain Name Service Service Discovery) is a mechanism for automatically configuring the discovered printer. The printer is also available directly through it's IP address, and specifcally connecting to port 9100. The ipp protocol is the Internet Printing Protocol which allows print jobs to be sent to the print server running locally here.
We can then set up the appropriate printer queue with a name of choice
-p), the device URI identified from above (
and enable the printer and allow it to accept print jobs
$ lpadmin -p HL3040CN -v usb://Brother/HL-3040CN%20series?serial=000J9J169344 -E
The PPD file will be expected to be found in /etc/cups/ppd/HL3040CN.ppd.
To print a test page:
$ lpr -P HL3040CN /usr/share/cups/data/testprint
Copyright © 1995-2020 Togaware Pty Ltd