Need help extracting printer driver name from ppd files

Jeep Guy jeepguy at mindspring.com
Thu Jul 12 11:46:58 PDT 2012


Without going into too much detail, I have a few groups of HA print servers in dev, QA, Prod environments and I need to keep the configs in sync.  I am writing a perl script that will extract most of the printer info from the printers.conf file and dump it to a semi-colon delimited file.  I intend to use this file later to rebuild the basic printer configs on other systems using the lpadmin command.

The problem that I am having is that I do not know how to get the print driver to be used with the lpadmin command.  I want to add the printers as follows:

lpadmin -L <location> -D <description> -p <Printer Name> -v <device URI> -m <printer driver> -E

I can get everything I need from the printers.conf file except for the <printer driver>.  It looks like the /etc/cups/ppd/<Printer Name>.ppd conf file should hold what I am looking for but I don't know if that is true or if so which variable I should be looking for in that file.

Would someone knowledgeable please chime in and let me know where to get the printer driver to plug into the lpadmin command?

Thanks.




More information about the cups mailing list