Skip to main content

You may be using a Web browser that does not support standards for accessibility and user interaction. Find out why you should upgrade your browser for a better experience of this and other standards-based sites...

Dartmouth Home  Search  Index

Dartmouth Home | Search | Index

Dartmouth home page
Computing at Dartmouth
Computing > Support >  Library >  Research > UNIX >

Printing From UNIX

All public access printers on campus are shared between the Macintosh and UNIX machines. To achieve this, the printers are connected to the AppleTalk network and appear to the Macintosh via the Chooser. A central print spooling system is used to transfer files from the UNIX systems onto the AppleTalk network. All of the printers, therefore, appear to the UNIX systems as remote printers connected to a system called "laserhost." The lpr spooling software is used to transfer files to laserhost for printing.

All of the printers support PostScript, and the spooling software will automatically detect files that appear to be plain text and convert them to PostScript using a standard conversion filter. This is semi-smart in that it tries to detect files with very long lines and select a landscape orientation for those files. Files that are already PostScript are passed through without change.

Every printer has a name, which is usually the same name as it is known to the Macintosh Chooser. In some cases, the UNX name is an abbreviation of the Macintosh name. The general command to print a file is lpr -Pprinter file [ file ... ], where printer is the name of the printer you want to use. Omitting the -Pprinter argument sends the files to the default printer. The default printers are:

  • Coos: kiewit_public
  • Grafton: kiewit_public
  • Belknap: kiewit_public
  • Northstar workstations: Whichever public printer is physically the closest

To change your personal default printer, you can set an environment variable PRINTER to the name of the printer you want to use, and thereafter, omit the -P option. For example, setenv PRINTER kresge_public.

To check the status of a print job after submission, there are two utilities available. Lpq will display the current status of the print queue, but only until it has been transferred to the AppleTalk system. At that point, the UNIX system considers the job completed. Pristat is a locally written tool to query the AppleTalk print spooling software, and shows essentially the same information as the Macintosh Print Monitor. Similarly, there are two utilities to cancel a submitted print job. Lprm will cancel a print job until it has been completely passed to the AppleTalk system. Priabort is the equivalent tool to cancel the job from the AppleTalk spooler.

Since there are so many printers on campus, not everyone has been enabled for printing from UNIX. To see the complete list of what is enabled on any specific machine, enter lpstat -t. To request that a new printer be enabled, send e-mail to the manager at the specific machine.

For software with a built-in Print command, it should be configured to call lpr -Pprinter if it is not already the default. On the SGI Indy workstations, you can also print by dragging a file icon onto the PrintPanel icon. If a built-in conversion tool to turn that file into PostScript is not available on the machine, you will get an error message.

Manual Pages to Check

  • lpr
  • lpq
  • lprm
  • lpstat
  • pristat

05/07/08

Last Updated: 5/8/08