Currently, there are two public-use printers available in the Department of Mathematics.lab - located in the grad lab
mail - located in mail room
Ensuring that the print job goes to the right printer can be accomplished in several ways:
- If you set the
LP_DESTvariable to the name of the printer you want to use, most print commands will send the print job there. (ThePRINTERvariable has the same effect as theLP_DESTvariable.)- Each time you queue a print job, you can use a command-line option to decide where to send your print job.
Setting Environment Variables
The method for setting environment variables differs depending on whether you are using the Bourne Shell (or one of its derivatives) or the C Shell (or one of its derivatives).If you are using the Bourne Shell, you must issue the following command at the prompt to set the
LP_DESTenvironment variable:Note,LP_DEST=printer
export LP_DESTprintermust be replaced by the name of the destination printer, either2225orcage.If you are using the C Shell, issue the following command:
Again, replacesetenv LP_DEST printerprinterby the name of the printer you want to use.
Sending Documents to a Printer
There are several different families of commands which can be used in the printing process. They are,Note that the BSD and System V family of commands can be used to print text and PostScript only. E.g., if you want to print a dvi file using these commands, you must first convert it to PostScript using
- the BSD family of commands,
- the System V family of commands, and
- a locally installed perl script named
dvips.The BSD family of commands include
lpr,lpqandlprm.lpris used to send a job to the printer. Simply type,This will sendlpr filenamefilenameto the printer specified byLP_DEST. You may use thePoption to specify which printer you want the job to go to,will sendlpr -P2225 filenamefilenameto2225, whateverLP_DESTis set to.lpqis used to get information about the printer, it also uses thePoption. Finally,lprmis used to cancel a print job, but it does not work reliably, so do not use it.The System V family of commands include
lp,lpstatandcancel.lpfunctions in the same way aslpr, with the exception thatlpr'sPoption is replaced byd. Thelpstatcommand is functionally equivalent tolpq. Finally,cancelis functionally equivalent tolprm(except that it actually works).For more information on any of these commands, use the
mancommand. Finally, there is the locally installed perl scriptIf you want to sendprint filenamefilenameto a particular printer, simply use thePoption, as follows.print -Pprinter filenameWhat about printing pdf files?
Use acroread to open the file. Selectfile, printand change the Printer command tolpr -PprinterWhereprinteris the name of the printer you would like to print to. [ example]
Last Modified on 16 Jan 2002