You are not logged in.

#1 2009-08-06 15:59:08

hypnotic_meat
Member
Registered: 2009-04-15
Posts: 32

[SOLVED] Automatically Installing Printers

I have a script that automatically detects network and usb printers and enables them by parsing the output of lpinfo.  The printers are being added correctly and I can print to them, however, I haven't yet found a way to grab the printer's name.  As a temporary workaround for testing purposes, I'm just using a counter so all my printers are named NETWORK1, NETWORK2, etc... (not very informative).  Is there some way that I can grab the corresponding printer name for each printer that I snag with lpinfo?

Thanks in advance for any help.

Last edited by hypnotic_meat (2009-08-06 19:08:38)

Offline

#2 2009-08-06 19:08:26

hypnotic_meat
Member
Registered: 2009-04-15
Posts: 32

Re: [SOLVED] Automatically Installing Printers

Just answered my own question.  Looking a little closer at lpinfo, supplying -l to the command (so: lpinfo -l -v) returns all kinds of useful information such as: make and model, device id, and class of printer.  More than enough to form a more usable printer name.  Case closed.

Offline

#3 2009-08-06 21:39:19

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: [SOLVED] Automatically Installing Printers

Mind posting your script? Here, or perhaps in this handy thread. I can see that being useful for network bouncing laptop users....

Thanks!
Scott

Last edited by firecat53 (2009-08-06 21:39:31)

Offline

Board footer

Powered by FluxBB