OpenWindows Advanced User's Guide

8.1.2 Submitting Print Requests Using a Printer Name

Whether or not a default printer has been designated for your system, you can submit print requests to any printer that is configured for your system. To submit a print request to a specific printer, type the following:

$ lp -d printername filename

where printername is the name of the specific printer and filename is the name of the file you want to print.

The specified file is placed in the print queue of the destination printer, and the request id is displayed.

For example, to print the /etc/passwd file on the printer acorn, type:

$ lp -d acorn /etc/passwd
request id is acorn-9 (1 file)
$ 

If you submit a request to a printer that is not configured on your system, an information message is displayed, as shown in the following example:

$ lp -d thorn /etc/passwd
UX:lp: ERROR: Destination "thorn" is unknown to the
              LP print service.
$ 

See System Administration Guide, Volume II for information on configuring printers. See "8.2 Determining Printer Status", in this chapter, for information about how to find out which printers are available on your system.