Need help extracting printer driver name from ppd files

Jeep Guy jeepguy at mindspring.com
Thu Jul 12 12:43:23 PDT 2012


> Jeep Guy wrote:
>
> > 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.
>
> Yes, the /etc/cups/ppd/<printername>.ppd file *is* the PPD associated with
> the <printername> and reflects the default preferences (like default page
> size etc.) you configured either using the web interface or the lpadmin
> command.
> The problem is that there is - as far as I know - no information abour the
> source directory the PPD has been installed from. That means your Perl
> script needs to copy the PPD from the /etc/cups/ppd directory to some
> globally accessible place (e.g. a NFS accessible directory).
>
> Helge
>

Thanks Helge,

In that case what do I supply to the lpadmin command for the <printer driver> option?




More information about the cups mailing list