[cups] programmatically obtain connection

Brendan Dailey bdailey at umich.edu
Fri May 20 14:50:37 PDT 2016


Hi John -

I believe the following should accomplish what you need:
lpstat -v <printer name>

You could also run `lpstat -p` to give you a list of printers that are
defined.

Hope that's helpful!
-Brendan

On Fri, May 20, 2016 at 5:27 PM, Boncek, John <jboncek at hunter.com> wrote:

> Using CUPS 1.7.2 under Ubuntu 14.04 at http://localhost:631, the Printers
> page shows a list of available printers.  When you click one, it shows
> various information about that printer, including "Connection", with values
> like "socket:10.2..." or "usb://HP/..."  How can I programmatically get
> that information for a printer?  I've looked thru the CUPS API but can't
> see any way to do so.  I know how to get a list of destinations but that
> doesn't contain this information as far as I can see.  Thanks for any help
> you can provide.  (If this is the wrong list for a question like this,
> please point me to a better one.)
> _______________________________________________
> cups mailing list
> cups at cups.org
> https://www.cups.org/mailman/listinfo/cups
>



-- 
Brendan Dailey
MiWorkspace Print Team Lead
Print Operations & Development Specialist
University of Michigan
734-936-0126
bdailey at umich.edu



More information about the cups mailing list