Need help extracting printer driver name from ppd files

Matt Broughton walterwego at macosx.com.invalid
Thu Jul 12 18:23:12 PDT 2012


In article <41576-cups.general at news.easysw.com>,
 Helge Blischke <h.blischke at acm.org> wrote:

> Jeep Guy wrote:
> 
> >> 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?
> 
> the full (absolute) path to your copy of the PPD.

Which, I believe, needs the -P option used instead of the -m option.

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

-- 
Matt Broughton
Only relatives are absolute.




More information about the cups mailing list