CUPS Printing Tips For Linux Unix
This page provides a brief introduction to using the CUPS printing system; full user documentation can be found at
http://cups.csail.mit.edu:631/sum.html
These instructions assume you are using a cups client for printing; if you are running CSAIL Debian this is what you have.
KDE Printing Manager
KDE, the default desktop environment in CSAIL, already knows about CUPS and all the attached printers. From the Printing Manager (K Menu -> Settings -> Printing Manager) you can browse all available printers, view the list of queued jobs, configure personal default printers and printer settings, and learn about supported features of a given printer. The settings you define in the Printing Manager affect your CUPS environment on all CSAIL Debian systems, whether you print directly from a KDE application or from the command line using
kprinter,
lpr, or some other CUPS front-end. A sample Printing Manager window looks like:
Command Line options
CUPS allows you to access all of the printer features on the command line by specifying options in the form
-o <option>=<value>
, multiple option specification are possible but each requires its own
-o
. You can also save common settings as personal queue
instances
Common Options
| action |
syntax |
notes |
| duplex |
-o sides=two-sided-long-edge |
this is the default |
| simplex |
-o sides=one-sided |
| no banner |
-o job-sheets=none |
| print banner |
-o job-sheets=standard |
| N up printing |
-o number-up=<N> |
where N=[1,2,4,6,9,16] |
More standard options are shown at
http://cups.csail.mit.edu:631/sum.html#STANDARD_OPTIONS, but these are the most common.
Advanced Options
The above options are generic and can be applied to any printer that is spooled through CUPS. CUPS also supports printer specific options for things such as paper tray and print quality selection. The following command will list all available options for a specific pritner:
lpoptions -p <queue name> -l
The output of this command is in the following format
ShortOptionName/Long Option Name: value1 *value2 value3
Here value two (with the asterisk) is the default value, to change this to value3 for a specific print job the command would be:
lpr -Pqueue -o ShortOptionName=value3 file-to-print.ps
Saving Option Sets
Specifying 4 up simplex printing with no banner page from paper tray 2 in 1200dpi presentation quality mode can get awfully tedious. Thankfully you can save these options into a printer instance which takes the form <queue-name>/<instance-name>
where <queue-name> is the printer you want to use and <instance-name> is a personal identifier for this option grouping. These opions are recorede in your ~/.lpoptions file. For example to record te previosly mentioned otions for the printer cabal in an instance called test you would look up the options using lpotions -p cabal -l as shown in the previous section and then use lpotions with the new queue/instance name and the selected options:
lpoptions -p cabal/test -o number-up=4 -o job-sheets=none -o <noop>InputSlot=Tray2 -o <noop>OutputMode=HiResPhoto -o sides=one-sided
Now anytime you print to lpr -Pcabal/test you will be invoking all those options. If you only specify a queue and don't specify an instance these options will be your personal defaults for this printer. You can check which options have been changed from the system wide default by using lpoptions -p <queue-name>[/instance-name], for example:
lpoptions -p cabal/test
number-up=4 job-sheets=none InputSlot=Tray2 OutputMode=HiResPhoto sides=one-sided
lpoptions -p cabal
job-sheets=none,none page-bottom=18 page-left=18 page-right=18 page-top=18
The xpp
proivides a GUI that allows you to set printer defaults and create printer instances. I find it cumbersome but it may be helpful to some
Client Settings for non CSAIL/Debian Systems
CSAIL/Debian workstation are configured to use our printing system by default. If you are running a different OS that uses CUPS printing you can probably get your print system configured with the following commands run as root, keep in mind your system is "unsupported" if this causes your system to explode there's not much we can do:
cp /etc/cups/client.conf /etc/cups/client.conf.bak 2>/dev/null
echo ServerName cups.csail.mit.edu > /etc/cups/client.conf
/etc/init.d/cups restart
(filenames may vary by distribution)
Linux drivers
TIG maintains and supports a CSAIL specific distribution of Debian.
If you are using another version of gnu/linux you may wish to use this driver,
note however that other versions of gnu/linux are not supported by TIG.