Determining host ip/computer name for agiven printer

Adam Penny adam_penny at hotmail.com
Sun Apr 13 06:40:03 PDT 2008


> On Sun, Apr 13, 2008 at 03:27:17AM -0700, Adam Penny wrote:
> >
> > What I'd like to know is whether cups has any preference/config
> > files anywhere that tell you either the ip for the printer's host
> > computer or the printer's host computer name, so that I can create a
> > plist so that I can use the tea4cups $TEAPRINTERNAME variable to
> > look up the relevant host name thus the mac address of the printers
> > host.
>
> This is /etc/cups/printers.conf
>
> You must extract the printer's hostname or IP address from
> the DeviceURI setting. You can get ALL devices URIs from `lpstat -v`
> but to extract the IP address from this you need some scripting or
> regular expression.
>
> bye
>
> Jerome Alet
>
Thank you Jerome, that's brilliant.

Adam




More information about the cups mailing list