Extending printers.conf with own attributes

Michael Sweet mike at easysw.com
Wed Oct 13 11:22:28 PDT 2004


Johannes Grumboeck wrote:
> Hi,
> 
> Can anyone tell me which files are involved in saving/reading an
> attribute from/to printers.conf? I'd like to extend the add/modify
> printer dialog with some attributes we would need to be saved with
> each printer. So I found out that scheduler/ipp.c,
> scheduler/printers.c, cgi-bin/admin.c ... and some more are all
> involved in editing printers.conf. I also extended it as far as my
> attribute keys are saved into printers.conf, but not the value. Also
> if I've entered a value manually into printers.conf the templates
> (especially modify-printer.tmpl) are not filled out with the values. 
> Can anybody give me a hint or howto extend printers.conf?
> 
> Or would it be possible to implement a generic solution for
> attributes in printers.conf: Let's say every attribute key which
> starts like "X_" (e.g. X_newkey) would be read/saved by cups and the
> value of this could be used in templates. What do you think about it?

We are in the process of completing custom attributes (specifically
to provide network default options, but the solution will support
any attribute) for CUPS 1.2.

The actual list of attributes is a configuration option in cupsd.conf
and is used whenever reading/writing printers.conf.

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com




More information about the cups-devel mailing list