Ubuntu: Get list of connected printers



Question:

So, I understand that I can list all printers with

$ lpstat -p -d  printer DYMO-LabelWriter-450-Turbo is idle.  enabled since Tue 06 Jun 2017 12:12:48 PM SGT  Waiting for printer to become available.  printer DYMO-LabelWriter-450-Turbo-2 is idle.  enabled since Tue 06 Jun 2017 12:12:31 PM SGT  Ready to print.  printer Epson-Stylus-NX420 is idle.  enabled since Mon 18 May 2015 05:23:36 AM SGT  printer Photosmart-C4200-series is idle.  enabled since Thu 11 May 2017 07:17:13 PM SGT  system default destination: Photosmart-C4200-series  

DYMO-LabelWriter-450-Turbo is installed but disconnected and DYMO-LabelWriter-450-Turbo-2 is both installed and connected.

What is the cleanest way to get the list of connected printers? Parsing the output of lpstat for "Ready to print."? Or is there some clean approach using lsusb?


Solution:1

lpstat will list printers that are being serviced by cups. I see that you have an HP Photosmart which I believe does not use cups.

Since you will most often be printing from a GUI app such as Libre or Firefox, I've found that clicking on System Settings -> Printers provides the most useful information.

For cups printers, lpstat -t should give you the maximum amount of current information about all the relevant printers your machine knows about.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »