Open System Services Management and Operations Guide (G06.25+, H06.03+)

Managing OSS Devices
Open System Services Management and Operations Guide527191-002
10-4
Using the /etc/printcap or printcap File
and printcap contains
default \FORTY.$S1.#BOOK
If the user enters the following OSS shell command:
lp file
the file file is printed at the Guardian spooler-location named \COMM.$S.#DEFAULT,
because that command does not specify a printer definition and therefore uses the
default definition in /etc/printcap. However, if the user enters the following OSS
shell command:
lp -D default file
the file file is printed at the Guardian spooler-location named \FORTY.$S1.#BOOK,
because that is the Guardian spooler-location name specified for default in
printcap.
When a user enters a print command that specifies an alias, and if either the alias is
not found in the printcap file or the printcap file does not exist, the printing utility
searches for the alias in the /etc/printcap file in order to map the alias to the
Guardian spooler-location name.
Once you have set up an alias for a printer, you can validate this alias by using it in an
lp command to print a sample text file, as described in the Open System Services
User’s Guide.
Using a Printer Environment Variable
Assign a value to the environment variable LPDEST or PRINTER to indicate the name
of the default printer for a user. You can specify the same default printer for all users by
placing the specification in the /etc/profile file, or you can specify a different
default printer for each user by placing the specification in the .profile file.
For example, the /etc/printcap file in Figure 10-1 on page 10-3 defines the printer
with the alias default and the Guardian spooler-location name
\COMM.$S.#DEFAULT as the default printer. To set the environment variable LPDEST
for a specific user to the alias default, so that the default printer for that user is
\COMM.$S.#DEFAULT, place the following specification in that user’s .profile file:
export LPDEST=default