CSL: Printing FAQ

The C.S. department supports many printing options: various printer brands and models, a variety of software; color; and versatile copiers that support printing, scanning, and e-mail transmission. This page describes some of these options, and how to utilize various printing features. Please also see the Printer List and Drivers page.

In this page:


Printing System: CUPS (and LPRng)

For many years, the C.S. department used LPRng as the primary printing system; especially with the Solaris OS. Due to a reduction of support and development for LPRng, we have transitioned the printing system to CUPS (Common Unix Printing System).

Historical note: Two primary printing systems evolved in different development branches of the Unix operating system. LPRng is an extension of the LPR family of commands that are common in the Berkeley (aka, BSD) branch. CUPS is styled on the lp family of the AT&T System V branch.

CUPS provides partial support for the LPR command syntax style, thus providing two sets of commands; e.g., lp and lpr. We've removed most of the LPRng discussion from this document, but some remains as context for people who are more familiar with that system.

Common print system commands
CUPS LPR function
lp lpr send a print job
cancel lprm cancel (remove) a print job
lpstat lpq check status of print jobs and queues
lpoptions - set or check printer options

Please see the appropriate man pages for command details. For example, in a terminal window, you can type, “man lpstat” to view the manual page for the lpstat command.


Printers and Command Basics

In general, our printers are named for the room number (and building) where they are located; they are listed in the table below.

The lp and lpr commands are the most basic way of sending print jobs (files, documents, etc.) to a printer. In many instances, printing may be initiated directly from an application running on your workstation, with options selected via a dialog window. For Windows, more information is available in the Windows printing FAQ. For information about printing from the wireless network, please see the wireless printing instructions. When possible, please try to print in duplex mode (both sides of the sheet) to save paper - this is generally the default setting.

To remove a print job, use the cancel or lprm commands. To check on the status of a print queue, use the lpstat or lpq commands.

Queue names* Location Use Modes* E-Mail**
color pr108c inside D108 LSRC PUBLIC sx,dx,raw
eprint ***   at D101 (lobby) LSRC PUBLIC   -
101 *** pr101 at D101 (lobby) LSRC PUBLIC sx,dx,raw -
108c pr108c inside D108 LSRC PUBLIC sx,dx,raw
109 pr109 outside D109 LSRC PUBLIC sx,dx,raw -
112 pr112a inside D112 LSRC PRIVATE sx,dx,raw -
128 pr128 outside D128 LSRC PUBLIC sx,dx,raw -
204 pr204a inside D204 LSRC PRIVATE sx,dx,raw -
214ac pr214ac inside D214A LSRC PRIVATE sx,dx,raw -
211 pr211 outside D211 LSRC PUBLIC sx,dx,raw -
230 pr230 outside D230 LSRC PUBLIC sx,dx,raw -
231 pr167 D231 (hall copier) LSRC PUBLIC sx,dx,raw
312 pr312 outside D312 LSRC PUBLIC sx,dx,raw -
admin pr312a inside D312 LSRC PRIVATE sx,dx,raw -
315a pr315a inside D315 LSRC PRIVATE sx,dx,raw -
315c pr315c inside D315 LSRC PRIVATE sx,dx,raw -
331 pr331 outside D331 LSRC PUBLIC sx,dx,raw -
332 pr152 D332 (hall copier) LSRC PUBLIC sx,dx,raw
020 pr020 inside N020 North PUBLIC sx,dx,raw -
022 pr022 inside N022 North PUBLIC sx,dx,raw -
141 robot-lab-printer inside N141 North PUBLIC sx,dx,raw -
224n pr224n inside N224 North PUBLIC sx,dx,raw -
311n pr311n inside N311 North PUBLIC sx,dx,raw -
3245f pr3245f inside N3245 French PUBLIC sx,dx,raw -

* NOTE: For CUPS-style commands, usually a -d (destination) option is used, e.g., “lp -dqueuename”; but sometimes it's -p, so please check documentation. For LPRng-style commands, printers can generally be selected via a -P option, e.g., “lpr -Pqueuename”.

The queue names listed above can be modified by appending modes to the end with a dash (see below). The available modes are:

  • sx = simplex (single-sided)
  • dx = duplex (double-sided), the default
  • raw = raw, do not force paper tray, size, etc

In most cases, the bare queue name (no -mode appended) is equivalent to -dx. You can also customize your own queue names using the lpoptions command.

**NOTE: These printers / copiers can scan and send the document as e-mail.

***NOTE: The eprint printer is primarily managed by OIT. It can be accessed via the ePrint system, and is one of a pool of campus printers that can print any ePrint job using DukeCard authentication. You can also print to this printer directly via the local 101 queue.

	lp -d101 myfile
	lp -Unetid -deprint myfile

In the first example above, the print job is sent directly to the printer via the local queue. In the second example, the job is sent to an OIT ePrint server, and can be retrieved from any ePrint printer on campus. Note that for eprint, if your CS username is different than your Duke NetID, then you must include the -U{NetID} option; it might not be possible to do this through most GUI print dialogs!


Command Examples


lp -d331-sx myfile
will cause your job to be printed single-sided on printer 331.
lpr -P128-dx yourfile
will cause your job to be printed double-sided on printer 128.
lpr -P020-raw -o 'inputslot=tray1' herfile
will result in a manual feed request on printer 020.
lp -d108c-raw -o 'duplex=none inputslot=tray1 hpstapleroptions=1angled' somefile
will result in a single-sided, manual-feed, stapled request on color printer 108c.

It is a good idea to use environment variables to hold the queue name of the printer that you use the most. That way, you do not have to type the -d or -P option when using that printer. For example, put this line in your .my-cshrc file:

	setenv LPDEST 022-dx		# for CUPS
	setenv PRINTER 022-dx		# for LPRng

Alternatively, you can use lpoptions -d queuename to designate your default printer.


Displaying queued print jobs:

lpstat -o
will show all jobs queued on all printers
lpstat -o 022-dx
will show all jobs in the 022-dx queue
will show jobs in your default queue
lpq -a
will show all jobs in all queues
lpq -P331-raw
will show all jobs in the 331-raw queue


Cancelling a print job:

A CUPS print job has a job ID that is either a number or 'queue-number'. You will need to run lpstat or lpq to list queued jobs, then use one of cancel or lprm to cancel one or more print jobs.

cancel 128-dx
will cancel your top job in the 128-dx queue
cancel 128-dx-12345
cancel 12345
these will cancel the print job with job ID 12345
will remove your top job in your default queue
lprm 12345
will remove your job with job ID 12345
lprm -P020
will remove your top job in the 020 queue


CUPS Options

CUPS provides two ways to select print options, i.e., when using commands and not an applicaiton dialog window. There's command-line selection via lp's and lpr's “-o” option. There's an example above in the Printers and Command Basics section.

Then there's setting options and creating instances with the lpoptions command. Let's say that your default printer is 109, and you always like certain features (options) set. You could set the defaults with something like “lpoptions -p 109 -o 'opt1=val1 opt2=val2 ...'”. Then, when you print to “lp -d 109”, your default options will automatically be used. If you also want a printer queue that has an alternative option, say you want simplex instead of duplex, you could create an instance with “lpoptions -p 109/sx -o 'duplex=none opt1=val1 opt2=val2 ...'”. You could then select this queue using “lp -d 109/sx”.

To get more information about the options available on a particular printer, use “lpoptions -l -d printername”, or contact the Lab Staff.



Our printing system can handle quite a few types of data conversions automatically. Give it a try. If it can't print your document, you will usually get an error message. For example:

	lp -d 312-dx FinalReport.pdf.gz

NOTE: Currently, Microsoft formats (e.g., Word documents) are not supported; you will need to first convert (export) to a supported format such as PS or PDF.


PDF's and Unusual Paper Sizes

Unfortunately, printing PDF's with page sizes other than letter will not usually transpire transparently; additional steps will probably be required. For example, to print a legal size file.pdf to printer 211,

	acroread -toPostScript -size legal < file.pdf > file.ps
	lpr -P211-raw -o 'inputslot=tray1 media=legal' file.ps

Note that the -raw queue is needed here to override some enforced defaults.
For more information on acroread options, type acroread -help.


Saving Paper: Printing N-Up; Using Copiers

In addition to printing in duplex mode (see above), you can save lots of paper and wear-and-tear on the printers by printing “N-up.” This means that you reformat the print job to print 2 (2-up) or more reduced-size pages per physical page. For text files, this can be done with the enscript command, for example:

	enscript -2r -P211 joesfile

For PostScript, use either of mpage or psnup.

	psnup -2 {filename.ps} | lp -d 020
	{some command} | mpage -2Sto -P128-dx

(mpage can also handle plain text.) For all of these commands, please see the man pages for more information.


Also, when making multiple copies of a document, please use one of the copiers (see the printer table above). Each page printed on a printer costs around twice as much as a page printed on a copier.

If you have any comments, corrections, questions, or suggestions, please contact the Lab Staff.