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 and FAX transmission. This page describes some of these options, and how to utilize various printer features. Please also see the Printer List and Drivers page.

In this page:

Printing Systems: LPRng and CUPS

For many years, the C.S. department has used LPRng as the primary printing system; this is most noticeable when using Solaris. Due to a reduction of support and development for LPRng, we've been transitioning the printing system to CUPS. Due to some as-yet unresolved issues with CUPS, we've not yet switched completely over to it, but there is a largely functional CUPS installation available on the C.S. network. In essense, we have two parallel, co-existing printing systems.

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.
Common print system commands
CUPS LPRng function
lp lpr send a print job
cancel lprm cancel a print job
lpstat lpq check status of print jobs or printers
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.

On Solaris hosts (e.g., login.cs.duke.edu), printing commands are generally LPRng commands, even the lp family commands. If you really want CUPS on Solaris, then prefix the commands with “cups-”, for example, cups-lpstat. On Linux, generally CUPS commands will be the default; i.e., even the lpr family commands are actually front-ends to CUPS commands.

Some applications - especially on Linux - will auto-detect the presense of a CUPS server, and will then use only that; examples are OpenOffice and Firefox.

OpenOffice:
If you prefer to disable CUPS, you will need to set this environment variable: SAL_DISABLE_CUPS=1. This can either be set in your startup files, or can be used with a command-line invocation. For help with this, please contact the Lab Staff.

Firefox:
For Firefox, we have disabled CUPS auto-detection by default. If you want to use CUPS, you'll need to do this:

To make this permanent, you might also need to add this line:

    user_pref("print.postscript.cups.enabled", true);
to the file: ~/.firefox/{name}/{number}.slt/prefs.js.

For help with this, please contact the Lab Staff.

Printers and Basic Printer Commands

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 initialed directly from an application running on your workstation or Windows PC, with options selected via a dialog box. 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**
color *** pr108c inside D108 LSRC PUBLIC sx,dx,ut,lt,tr
eprint ****   at D101 (lobby) LSRC PUBLIC  
101 **** pr101 at D101 (lobby) LSRC PUBLIC sx,dx
109 pr109 outside D109 LSRC PUBLIC sx,dx,mf
112 pr112a inside D112 LSRC PRIVATE sx,dx
128 pr128 outside D128 LSRC PUBLIC sx,dx,mf
204 pr204a inside D204 LSRC PRIVATE sx,dx,mf
211 pr211 outside D211 LSRC PUBLIC sx,dx,mf
230 pr230 outside D230 LSRC PUBLIC sx,dx,mf
231 pr167 D231 (hall copier) LSRC PUBLIC sx,dx,mf
312 pr312 outside D312 LSRC PUBLIC sx,dx,mf
admin pr312a inside D312 LSRC PRIVATE sx,dx,mf
315 pr315a inside D315 LSRC PRIVATE sx,dx,mf,ut,lh
315c pr315c inside D315 LSRC PRIVATE sx,dx,mf,ut,lh
331 pr331 outside D331 LSRC PUBLIC sx,dx,mf
332 pr152 D332 (hall copier) LSRC PUBLIC sx,dx,mf
020 pr020 inside N020 North PUBLIC sx,dx,mf
022 pr022 inside N022 North PUBLIC sx,dx,mf
224n pr224n inside N224 North PUBLIC sx,dx,mf
311n pr311n inside N311 North PUBLIC sx,dx,mf
3245f pr3245f inside N3245 French PUBLIC sx,dx,mf

*NOTE: For LPRng commands, printers can generally be selected via a -P option, e.g., “lpr -Pqueuename”. For CUPS commands, usually a -d option is used, e.g., “lp -dqueuename”. For CUPS commands, only the first listed queue name -- plus name-sx and name-dx -- will work; you can also customize your own queue names using the lpoptions command.

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

(Actually, -dx and -sx will now usually work with CUPS, too.)

Examples:

lp -d331 -o duplex=none 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-mf herfile
will result in a manual feed request on printer 020.
lp -d108c-sx -o '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 .cshrc file:

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

With CUPS, you can also use lpoptions -d queuename to designate your default printer.

On the HP4730MFP and HP4650DTN (color printers), -ut (uppertray) and -tr (transparency) are equivalent.

On the HP4050TN, -ut (uppertray) and -lh (letterhead) are equivalent.

***NOTE: The color printers require special transparencies, which can be obtained from the Lab Secretary in D128. Do not use unapproved transparencies or paper in these printers! Other non-approved transparencies will melt in the printer and cause damage; i.e., they will not work!

****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!

CUPS Options

Cups provides two ways to select print options, i.e., when using commands and not an applicaiton dialog box. There's command-line selection via lp's “-o” option. There's an example above in the Printers and Basic Printer Commands 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.

LPRng “Z” Options

Additional options are available via lpr's -Z flag. As with printer “modes”, availability of these options depends on a particular printer's capabilities.

Some of the options that are available on the HP4050N printers are:

300 300 dpi resolution, draft quality
600 600 dpi resolution (default)
1200 1200 dpi resolution, very high resolution
fastres (1200 dpi only) full speed printing
fastresoff (1200 dpi only, PRORES) highest resolution, slower printing
economode uses less toner (default)
economodeoff uses more toner
simplex single-sided (default)
duplex double-sided
portrait vertical orientation (default)
landscape horizontal orientation

Additional options on appropriate printers:

letterhead letterhead tray
transparency transparency tray
manual manual feed tray
staple staple sheets

Multiple Z options can be selected by separating them with commas, for example:

	lpr -Z300,landscape,duplex somefile

It is impractical to try to list all options for all printers here. Using an option not applicable to a printer simply causes that option to be ignored, so it doesn't hurt to experiment. For information on particular printers, try checking the web site for that printer manufacturer, or contact the Lab Staff.

Conversions

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, or in the case of LPRng, receive an e-mail letting you know what happened. For example:

	lpr -P312-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-mf -Zlegal,duplex file.ps

For more information on acroread options, type acroread -help.

Saving Paper: Printing N-Up

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-dx joesfile

For PostScript, use either of mpage or psnup.

	psnup -2 {filename} | lpr -P020
	{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 copy machines. Each page printed on a printer costs around twice as much as a page printed on a copier.

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