HMC Homepage      CS Home

How to print on the Computer Science printers

This file is meant as a short guide to get you started using our printers. There are many more options available than those listed here, but this should be enough to allow you to get your files onto paper. See the appropriate man pages and CUPS Documentation for more information.

Instead of using Sun's printing system, we use CUPS, a complete replacement for Sun's printing system. If you are familiar with traditional UNIX printing (using the lp or lpr commands), don't worry; these commands are available in CUPS, although the options have changed somewhat.

Printing files

Note that in CUPS, lp and lpr are identical; which command you use does not matter.
lpr filename
Print the file filename on the default printer.
lpr -Pprinter filename
Print the file filename on the printer called printer
lpr -P lp@hostnameofprinter filename
Print the file filename to any printer which has an open LPR port
lpr -o sides=two-sided-long-edge filename
Print the file on the default printer, using both sides of the paper. (See lp2)

Cancelling print jobs

lprm
Remove the first of your jobs in the queue.
lprm all
Remove all of your jobs from the queue.
lprm -Pprinter 134
Remove job number 134 in the queue for the printer printer.
cancel
System V version of lprm. Under CUPS, cancel is identical to lprm.

Saving Paper

We have set up some utilities which make it easy for you to save paper.
lp2 filename
Print one page on each side of the paper.
lp2s filename
Print two pages on the front, nothing on the back.
lp4 filename
Print two pages on each side of the paper.
lp4s filename
Print four pages on the front, nothing on the back.
lp8 filename
Print four pages on each side of the paper.
lpr -p gute-duplex filename
Prints one page on each side of the paper to gute. Helpful for situations where a program won't allow you to specify print options.
By combining the -o sides options with the -o number-up option, it is possible to print up to 32 pages of data per page of paper. See The CUPS General Options for specifics.

Miscellaneous

lpstat -p -d
List the name and status of all the available printers.
lpbook filename
Print a postscript file such that the pages can be folded to make a booklet.
lpr -o landscape filename
Print a file in landscape (wide) format.
lpr -o landscape -p printer filename
Print a file in landscape format on the printer printer.
lpq
List all print jobs in the queue for the default printer
lpq -a
List all print jobs.

Printing to AC Printers

It is possible to print to the printers in the AC and Linde Rec Center. This is accomplished simply by using the command:

lpr -P printer@orion.ac.hmc.edu filename

Which prints the file filename to the printer printer in the AC or Linde Rec center. (Odie, Lassie, Cujo, etc.)


Copyright (c) HMC Computer Science Department. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License.''

HMC Computer Science Department
Contact Information
Last Modified Wednesday, 21-Sep-2005 10:36:02 PDT