[cups.general] Setting the default printer?

pipitas k1pfeifle at gmx.net
Tue Dec 21 13:55:04 PST 2004


Andrew McCall wrote:

> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error you must delete
> it 

Hmmmm....

> and notify the system manager (e-mail: postmaster at oldham.gov.uk). 

Should I really?  ;-)

> **********************************************************************
> Hi Folks,
> 
> I seem unable to set the default printer using lpadmin -d printer-name
> command, it seems to set it sometimes, but after CUPS restarts the system
> doesn't have a default printer anymore. Other times it fails to do
> anything at all.
> 
> Is there a config file that I can manually set the default printer in?

All printers are defined in the "/etc/cups/printers.conf" file of the
CUPS server. 

The system-wide default printer is the one that is tagged with the
"Default" keyword. The complete printer entry may look like this:

  <DefaultPrinter digimaster9110>
  Info
  Location
  DeviceURI lpd://10.160.32.1/mqueue
  State Idle
  Accepting Yes
  JobSheets banner.ascii,none
  QuotaPeriod 0
  PageLimit 0
  KLimit 0
  </Printer>

Please be aware that every user may choose to set his/her own
personal "default" printer. In which case it is defined in the
"$HOME/.lpoptions" file. An entry here could look like:

  Default mopier Option5=True OutputBin=OutputBin2 

To set a user-default printer, a user would have used the
"lpoptions -d" command.

If the root user runs "lpoptions -d", the default printer
configuration ends up in "/etc/cups/loptions".

If users have used any of the available printing GUI frontends
(kprinter, xpp, gtklp), they might have used the "Set as default"
(or similar) button (which would be equivalent to the "lpoptions
-d" command).

All 3 methods (lpadmin, loptions/root, lpoptions/user) might have 
been used on your system(s).

If all 3 files ($HOME/.loptions, /etc/cups/lpoptions, 
/etc/cups/printers.conf) define (different) default printers, they
take precedence in this order:

 1. $HOME/.loptions
 2. /etc/cups/lpoptions
 3. /etc/cups/printers.conf

I hope this helps.

Cheers,
Kurt

> Thanks,
> 
> Andrew McCall
> Senior Technical Officer (Server)





More information about the cups mailing list