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

Managing OSS Devices
Open System Services Management and Operations Guide527191-002
10-2
Specifying a Default Printer
Printer management in the OSS environment consists of defining aliases for Guardian
spooler-location names. The aliases in the /etc/printcap file provide a system-
wide set of definitions. At least one alias should be provided in that file.
A user can also define aliases in his or her own printcap file. When you add a new
user to the system, consider creating a printcap file in the user’s initial working
directory. Providing a printcap file unique to each user allows you to assign a
conveniently located printer to that user.
Specifying a Default Printer
You specify a default printer:
By specifying the Guardian spooler-location name for a system default printer in
the /etc/printcap file. Specifying a system default printer allows you to control
which printer is used for high-volume print jobs.
By specifying the Guardian spooler-location name for a default printer for a specific
user in one of the following ways:
°
Specify the Guardian spooler-location name for the chosen printer in the users
printcap file.
°
Define the LPDEST or PRINTER environment variable for the user. See Using a
Printer Environment Variable on page 10-4 for more information about these
variables.
°
Use the env shell command, described in the env(1) reference page either
online or in the Open System Services Shell and Utilities Reference Manual.
(The env command can be included in the /etc/profile file or in the default
.profile file.)
When a user invokes an OSS printing utility such as the OSS shell lp command, the
OSS environment searches the following items, in the order listed, to determine the
destination printer:
1. The command line (for example, in the lp command, the printer named in the
-d flag).
2. The LPDEST environment variable value.
3. The PRINTER environment variable value.
4. The printer listed as the first entry in the /etc/printcap file.
5. The printer listed in the first line of the printcap file in the directory specified by
the HOME environment variable. By default, the HOME environment variable
specifies the users initial working directory.
If no printer is specified in any of these items, an error is generated and the print job is
not completed. You should provide at least the entry for default in the
/etc/printcap file in Item 4, because all the other items can be omitted or
accidentally removed by user actions.