Automate printer config using ppdc ?

Gabriel Somlo gsomlo at gmail.com
Wed Feb 9 12:33:35 PST 2011


Hi,

I'm trying to preconfigure a printer on Fedora14
via kickstart (essentially, I want to automate
the steps one would go through for setting up a
printer using e.g. the localhost:631 Web U/I).

I have narrowed this down to two steps:

   1. Adding a <Printer foo>...</Printer>
      block to /etc/cups/printers.conf, and

   2. Generating a corresponding foo.ppd file
      in the /etc/cups/ppd/ directory.

Since I know I want the "Generic Postscript
printer" driver, I also figured out that I can
run:

    ppdc /usr/share/cups/drv/sample.drv

from /etc/cups/, and then use the ppd/generic.ppd
file as a starting point.

My questions are:

   1. Is there a way to have ppdc only generate
      "generic.ppd", and not also all the other
      .ppd files (deskjet, dymo, epson*, etc.)
      that are listed in sample.drv ?

   2. The generic.ppd file differs from the
      desired end-result I can achieve via the
      Web U/I by only two lines:

[somlo at foobox ~]# diff foo.ppd ppd/generic.ppd
106c106
< *DefaultDuplex: DuplexNoTumble
---
> *DefaultDuplex: None
114c114
< *DefaultOption1: True
---
> *DefaultOption1: False

     ... which I assume are what happens once I
     select 'Duplex Unit' and 'Long Edge' via the
     Web U/I. Is there any way to tell ppdc to
     generate the default.ppd file with those two
     options set properly ? For a while I was hoping
     that '-D name=value' might do this for me, but
     that didn't seem to do anything for me. I can
     always use 'sed', but was looking for a more
     standard, cups-approved way.

Thanks much for any clues and ideas,
--Gabriel




More information about the cups mailing list