http://en.opensuse.org/SDB:CUPS_in_a_Nutshell#Command-line_Tools
Reason:
The configuration files are not reloaded for every print job. Rather, cupsd keeps much of the information in the main memory and writes information back to the configuration files whenever needed. Exception: /etc/cups/cupsd.conf
After modifications in this configuration file, cupsd must be restarted in order to make it use the modified configuration. See Section "Restarting the CUPS Server" in the "CUPS Software Administrators Manual" http://localhost:631/sam.html#RESTARTING or file:///usr/share/doc/packages/cups/sam.html#RESTARTING.
For example, to set up the same queues on several machines (e.g., for a backup server), do not copy /etc/cups/printers.conf and /etc/cups/ppd/*, but write the respective commands in a script (usually a sequence of lpadmin commands) and run the script on the various machines. In this way, any error messages will be displayed on the respective machines (e.g., if a PPD file is not available on a machine or if a backend is not available or not ready to use). Furthermore with such a script you have something like a log-file of the settings, enabling you to restore the settings by running the script at any time.
In many cases, the sequence of the options is significant. Read the man pages. For example, the following commands are all different:
lpadmin -E -p queue, lpadmin -p queue -E lpadmin -E -p queue -E
Command-line tools for creating or editing queues:
Example for creating a queue:
root@host# lpadmin -p funprinter1000 -v parallel:/dev/lp0 -E -P /usr/share/cups/model/Postscript.ppd.gz
Use the following command to check what was created:
user@host$ lpstat -a funprinter1000 -p funprinter1000 -v funprinter1000 funprinter1000 accepting requests since Jan 01 00:00 printer funprinter1000 is idle. enabled since Jan 01 00:00 device for funprinter1000: parallel:/dev/lp0
Alternatively, take a look at /etc/cups/printers.conf:
<Printer funprinter1000> Info funprinter1000 DeviceURI parallel:/dev/lp0 State Idle Accepting Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 </Printer>
Or query the system with the web front-end: http://localhost:631/printers/funprinter1000
Editing the queue (e.g., changing the description and location):
root@host# lpadmin -p funprinter1000 -D "ACME FunPrinter 1000" -L "2. floor: room 3"
Displaying the printer-specific options and their default settings in /etc/cups/ppd/funprinter1000.ppd:
user@host$ lpoptions -p funprinter1000 -l Resolution/Output Resolution: 150dpi *300dpi 600dpi 1200dpi 2400dpi PageSize/Media Size: Letter Legal Executive *A4 A5 ...
The output has the following syntax:
main-keyword/translation-string: option-keyword option-keyword option-keyword ...
The default setting is marked with an * preceding the "option-keyword".
Changing the printer-specific default settings in /etc/cups/ppd/funprinter1000.ppd:
root@host# lpadmin -p funprinter1000 -o Resolution=600dpi -o PageSize=Letter
The syntax is as follows:
lpadmin -p queue -o main-keyword1=option-keyword1 -o main-keyword2=option-keyword2 ...
Do not use lpoptions for this purpose. Refer to the Support Database article "Print Settings with CUPS": SDB:Print Settings with CUPS. Normal users can use lpoptions to save their personal default settings in ~/.lpoptions. More information on this is presented in the same Support Database article.
Deleting the queue:
root@host# lpadmin -x funprinter1000
http://en.opensuse.org/SDB:CUPS_in_a_Nutshell
Use lpoptions to save personal printer-specific option settings in ~/.lpoptions. Example:
user@host$ lpoptions -o Resolution=1200dpi -p funprinter1000
documented on: 2006.09.07