Printing on Athena involves three components: the print job or file, the print server, and the printer itself.
A printer has two different names: the queue name and the host name. An example of a print queue name is ajax, one of the printers in the W20 cluster.
A printer, like any other network device, also has a host name, which ends in mit.edu. The printer host name for ajax is ajax-p.mit.edu. For all public cluster printers, the host name will always be the queue name followed by "-p.mit.edu". However, other printers (in offices, libraries, dorms) will be different.
The only guaranteed way to get a printer's host name is to look it up in moira. You can also use the gprn program in the consult locker.
Some commands take the queue name, and others take the host name. Pay attention to which is which.
Print jobs are sent to the print server via the lpr command. The lpr command can accept two kinds of files only: plain text, and PostScript. Any other files (PDF, .doc, etc must be printed from another application).
- lpr -P<printername> <filename>
The lpr command takes several common options:
- -P nameofprinter
- -Z printeroption
Without this option, your print job will be sent to the default printer. Many workstations do not have default printers (quickstations, for example). You can specify the printer you want to print to here. This is the printer queue name, not the hostname.
Example: lpr -P ajax
Note: Older versions of Athena required no space between the printer name and the P, so you may see examples such as "lpr -Pajax". Either format is acceptable now.
This option tells the printer not to print the header page for a print job. Some users want to do this to save paper. However, if you're printing to a very busy printer, you may want to keep the header page, so you can easily find your print job when you get to the printer.
Example: lpr -h
This allows you to pass some special options to the print server. For example, you can specify your header page type (graph paper, polar paper, music staff, etc), or you can tell the printer to print single-sided.
|lpr -Z simplex||Print single sided|
|lpr -Z banner=polar||Specify polar graph paper as your header page|
|lpr -Z simplex,banner=polar||Multiple options can be separated by commas|
The lpq command allows you to query the status of a print queue. Like the lpr command, it takes