[cups] lpadmin vs. /etc/cups/lpoptions

Michael Sweet msweet at apple.com
Fri Jan 22 08:08:29 PST 2016


Arney,

> On Jan 22, 2016, at 6:57 AM, Arney <dev-cups.org at arney.de> wrote:
> ...
> Questions:
> 1) A little experimentation indicates, that the settings in /etc/cups/lpoptions will have precedence before everything set using lpadmin. Is that true?

Locally, yes.

The order of precedence is:

    System Preferences                          (on OS X)

    ~/.cups/lpoptions                           (lpoptions as normal user)

    /etc/cups/lpoptions                         (lpoptions as root)

    /etc/cups/ppd/printername.ppd and
        /etc/cups/{classes,printers}.conf       (lpadmin stuff)

> 2) Is /etc/cups/lpoptions the preferred way to set system-wide defaults?

Generally, no.  Those options only apply to locally-submitted jobs.

> 3) How come there are these two ways? Historical reasons?

There are actually 3 ways (4 on OS X...), and this has evolved out of use cases that predate CUPS.

Basically, there are options you want to apply for all users of a queue (including remote users) - this includes installable options in PPD files.

Then there are options you want to apply for all users of a queue on a particular system.

Then there are options that the user saves for their own print jobs to a queue.

Then (on OS X) there are options managed through the system preferences utility - the system-wide default media size, the "last used settings" for each queue, and whether to default to a particular printer or use the last used queue on the current network.

_________________________________________________________
Michael Sweet, Senior Printing System Engineer




More information about the cups mailing list