Linux Printing

When working on one of the Sociology computational servers (paradigm or charisma) or the login server (anomie2), printing is done to one of the department network printers.

Three general purpose laser printers, one color laser printer and the Ricoh copier are available for Linux printing, as indicated in the table below. Output is sent to a specific printer by directing it to the queue associated with that printer. Please use the color printer only when needed.

Department of Sociology Network Printers

Printer

Location

Details

Linux Print Queue Name

HP LaserJet P3015X

Room 135

Lab and 1st Floor - 42ppm, duplex, PostScript

lab

HP LaserJet P3015X

Room 268 Hallway

2nd Floor - 42ppm, duplex, PostScript

copy2 [default]

HP LaserJet P3015X

Room 330MR

3rd Floor - 42ppm, duplex, PostScript

copy3

HP Color LaserJet 4700dn

Room 268

Departmental color - 31ppm, duplex, PostScript [available only during regular business hours]

color

Ricoh Aficio MP 7500

Room 258

Departmental copier & high volume printer - 75ppm, duplex, hole punch, staple, collate

ricoh

Common printing tasks include:

The Default Print Queue

The default Linux print queue is copy2, which directs output to the LaserJet P4015tn printer located in the second floor copy room. You can set a personal default with the lpoptions command, which writes a setting to the .lpoptions file located in your home directory. The example below sets a personal default to the lab print queue.

Printing with the lpr Command

The lpr (line printer requester) command is used to send output to the default or to a designated print queue. Commonly lpr receives a specified file as input, but can also accept standard input piped to it from another command. The following examples clarify:

The lpr command sends output without altering it. If the file is text, then text is printed. Graphical and PostScript files are handed off as such, leaving the task of formatting them to the printer.

Printing with the enscript Command

The enscript command is used to convert text into PostScript formatted output, which is then directed to a print queue. This allows for labelling, indentation, font control, landscape printing, multi-column printing, duplex printing and other variations that add to the flexibility and convenience of output preparation. Output from interactive Linux SAS sessions, for example, prints using enscript landscape, 2-column printing. The following table illustrates typical uses of enscript.

Command

Description

$ enscript note.txt

Direct named file to the default queue. Each page of output will have a bold header containing the filename, the date, the time and a page number

$ enscript -Pcopy3 note.txt

Direct named file to the copy3 print queue

$ enscript -DDuplex:true note.txt

Print the named file in duplex mode

$ enscript -n2 note.txt

Direct that two copies of the named file be printed

$ enscript -i8 note.txt

Print the named file with left indentation 8 characters more than normal

$ enscript -G note.txt

Print the named file with fancy headers

$ enscript -B note.txt

Print the named file without headers

$ enscript -r note.txt

Print the named file in landscape mode

$ enscript -2r note.txt

Print the named file in landscape mode with two columns per page

$ enscript -2rG -Plab note.txt

Direct the named file with fancy headers in landscape, 2-column mode to the lab print queue

$ enscript -2rG logit.log logit.lst

Print multiple files with one enscript command [i.e.; a set of SAS program and output logs]

$ enscript -fTimes-Roman9 note.txt

Print the named file using Times-Roman, 9-point font

$ enscript -a 4-7 codebook.txt

Print pages 4-7 of the named file

$ enscript -a -9 codebook.txt

Print the first through 9th pages of the named file

$ enscript -a 6- codebook.txt

Print the 6th through the last pages of the named file

$ enscript -a odd codebook.txt

Print the odd pages of the named file

$ enscript -a even codebook.txt

Print the even pages of the named file

The default font for portrait printing is Courier 10 point (a mono-spaced font where each character occupies the same amount of space). The default for landscape, two column (-2r) printing is Courier 7 point.

You may combine several of the above options to produce highly tailored printing effects. For a full discussion of enscript, see the enscript man page.


Computing Home | Sociology Home | Trinity College Home | Duke Home