This document provides a quick overview of what is needed to print from a UNIX system connected to the RCS printer system.
Standard UNIX Printing Commands
lpr filename - sends a plain text or PostScript file to a printer
lpq - checks the status of a printer queue
lprm - removes a job from a printer queue
For example, to print the file named myfile, issue the UNIX command:
The above commands assume the default printer. You can verify the name of the printer used by looking in the "Messages" window after issuing the lpr command. You can also display the name of the default printer by using the Verbose option on the UNIX lpq command (note the uppercase V):
Selecting a Printer
All the above printing commands accept the -P option to specify a printer other than the default. You can specify a printer name on the lpr command by using the -P option. For example, to print the file myfile on the duplex printer in the VCC named vclw:
lpr -Pvclw myfile
Alternatively, if you are using an RCS UNIX workstation, you can select a printer by using the printerchooser application from the RCS Applications menu, which provides an easy graphical way to to choose a printer. Be sure to select the printer before using the Print command on your application.
Checking the Print Queue
To check on the status of your job, issue the command lpq. If you have used a printer other than the default, you must include the -P option to specify the printer, for example:
You can add the option -V to the above command, which will provides a more verbose response, including the printer's full name, its current status, and a list of the queued jobs.
Cancelling a Print Job
To cancel a job, first use the lpq command to find your job number. Then issue the command: lprm nnn, replacing nnn with your job number. If you did not use the default printer, be sure to include the -P option on the lprm command.
Special Options Available With VCLW
Some printers, such as the VCLW duplex (twosided) printer in the VCC machine room, can accept special options accessible via the -X option on the lpr command. Special options on vclw include the following, where all the options on the same line are synonyms:
|duplex=tumble||twosided=tumble||(prints back of sheet upside down)|
Note that twosided is the default. Output from vclw is filed in the output racks near the VCC South lab in that building.
Printing Unix Manual Pages
You can print a man page (as plain text) by "piping'' the output from the man command to lpr. For example, to print the man page describing the psnup program (described below):
man psnup | lpr
Printing DVI Files
DVI files are device independent files generated by the programs TeX and LaTeX. To print a DVI file on an RCS PostScript printer, use the PostScript driver dvips. The command
sends the file myfile.dvi to the default printer. It is also possible to specify a printer with the -P option. Other dvips options include landscape printing, selection of pages, placing output in a file, and changing the magnification.
For a complete description of dvips, see the man page for dvips.
Landscape and n-up Printing
Two utility programs allow you print in landscape orientation and/or print multiple pages on one sheet of paper: the program enscript reads plain text files; the program psnup reads PostScript files. Below are two examples. See the man pages for these programs for complete information.
The following command prints a two-up landscape (rotated) listing of the file myprogram.c (enscript also accepts the -P option for selecting a printer):
enscript -2r myprogram.c
In the command below, psnup reads a POSTSCRIPT file called printfile.ps and formats it as 2x2 pages in portrait orientation. Note that the file must be piped to lpr to be printed.
psnup -n4 printfile.ps | lpr
Last Reviewed: 27-Jul-2018