Topics Map > Desktop Support > Linux
Topics Map > User Services > Printing

Printing from Linux

The SSCC's Linux servers all have access to the SSCC's network printers. This allows all SSCC users to print to 2470, 3218, and 4218 Social Science.

SSCC printing costs are substantial, to both the SSCC's budget and the environment. We do not charge SSCC members for printing, but we do track printer usage and report it to our member agencies. This then becomes one of the factors in determining how much each agency contributes to the SSCC budget.

We urge you to look for ways to conserve on printing whenever possible. This would include printing double-sided, printing more than one page per sheet if possible, and only printing what you really need. Instructions for doing all of these are included in this article.

The enscript Command

You can submit jobs to be printed using the enscriptcommand. This replaces the lpr command which often does not work with the newer printers. The basic syntax is:

enscript options file

Here file should be replaced by the name of the file you want to print. It is possible to use wildcards, but do not do so unless you are certain you will only print the files you need.

Print Queues

One of the most important options is the print queue. Each printer has two queues (one for double sided printing and one for single), and you select the one you want to use with the -P option followed by the queue name. Always use the double-sided queues if at all possible. If you do not specify a printer it will go to the default, which is user4double. The following table lists the available print queues:

Output LocationQueue NameNotes
Computer Lab (4218)user4double (u4)Prints on both sides of the paper. Self-service printer. This is the default printer if no queue is specified.
user4single (u4s)Prints on one side of the paper only. Self-service printer.
Computer Lab (3218)user3doublePrints on both sides of the paper. Self-service printer.
user3singlePrints on one side of the paper only. Self-service printer.
Computer Lab (2470)user2double (u2)Prints on both sides of the paper. Self-service printer.
user2single (u2s)Prints on one side of the paper only. Self-service printer.

The names in parentheses are shortcut aliases for the actual queue names--you may find them convenient.

enscript file

will print your file double sided in the 4218, while

enscript -P u2s file

will print your file in 2470, and on just one side of each page.

Printing Options

Many other options allow you to control the way your document will be printed. One we ask that you use as often as possible is -Ux which allows you to print x pages per side of the paper. Thus

enscript -U2 -P u4 file

will print four pages of your file per sheet of paper (two on the front and two on the back). Of course the printing will be smaller, but this may be acceptable for codebooks, logs, or other long documents.

You can print your file in landscape format with the -r option, e.g.

enscript -r file

Think of this as rotating your file 90 degrees, hence the -r. Note that by default SAS assumes you are printing in portrait format. If you include the following line in your SAS program any output after that point will be formatted nicely for landscape printing:


You can also specify which pages you want printed with the -a option, The baisc syntax is -a x-y, where x specifies the starting page and y the ending page. A single number will print just that page. If you give a single number with a dash, enscript will treat the missing number as either the beginning or the end of the file. Thus

enscript -a 3-5 file

will print pages three through five,

enscript -a 4 file

will print just page four,

enscript -4 file

will print from the beginning to page four, and

enscript 4- file

will print from page four to the end.

There are many more options. Type man enscript to see them all.

Printing Postscript Files

The enscript command converts files to postscript format before printing, which normally works quite well. However if a file is already in postscript format, the output will be useless. Normally postscript files end with the extension .ps. To print postscript files use lpr. The syntax for choosing a printer with lpr is identical to enscript. For example:

lpr -P u2d

If you need to use other options please type man lpr.

The lpr command does not allow for printing multiple pages per sheet. However you can pipe to output of a postscript command to lpr:

psnup -n 2 | lpr

This will print to the 4218 printers with two pages per sheet.

See Also:

Keywords:print, printing, linux, linstat   Doc ID:96131
Owner:Dan B.Group:Social Science Computing Cooperative
Created:2019-11-21 17:02 CDTUpdated:2020-11-04 15:23 CDT
Sites:Social Science Computing Cooperative
Feedback:  0   0