[cups.development] Determining host ip/computer name for a given printer
Jerome Alet
alet at librelogiciel.com
Sun Apr 13 03:42:11 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
More information about the cups-devel
mailing list