Полезная информация

UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 43.3 Printer Control with lpc Chapter 43
Next: 43.5 Using Symbolic Links for Spooling

43.4 Using Different Printers

Each printer on your system should have a name. By default, commands that send a file to a printer assume that the printer is named lp-which probably stands for "line printer" (though it could stand for "laser printer"). If you're using a single-user workstation, and have a printer connected directly to your workstation, you can name your printer lp and forget about it.

However, in most environments, there are more options available: e.g., there are several printers in different parts of the building that you can choose from. Often, only one printer will be able to print your documents: you may need to send your print jobs to a PostScript printer, not the line printer that the accounting department uses for billing.

There are two ways to choose a printer:

Note that System V Release 4 includes both the System V and BSD print commands (lp and lpr). This can make things confusing, particularly if you're using a script to process troff or TeX documents, and that script automatically sends your documents to the printer. Unless you know how the script works, you won't know which variable to set. I'd suggest setting both PRINTER and LPDEST.

By the way, if you only have one printer, but you've given it some name other than lp, the same solution works: just set PRINTER or LPDEST to the appropriate name.

- ML

Previous: 43.3 Printer Control with lpc UNIX Power ToolsNext: 43.5 Using Symbolic Links for Spooling
43.3 Printer Control with lpc Book Index43.5 Using Symbolic Links for Spooling

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System