The LP print service uses an interface program and the terminfo database to initialize each printer and establish the following:
Selected page size
Each printer is identified in the terminfo database with a short name. The short name required by the terminfo database is identical to the name used to set the TERM shell variable. This name is also the printer type that you specify when setting up a printer. For example, the entries for different types of PostScript printers are in the /usr/share/lib/terminfo/P directory. The default entries provided with the SunOS software release are PS (for PostScript) and PSR (for PostScript Reverse).
If you cannot find a terminfo entry for your printer, you still might be able to use the printer with the LP print service without the automatic selection of page size, pitch, and character sets. However, you might have trouble keeping the printer set in the correct modes for each print request.
Customize the interface program used with the printer.
Add an entry to the terminfo database.
A terminal or printer entry in the terminfo database contains and defines hundreds of items. The LP print service, however, uses fewer than 50 of these items. For more information about the terminfo items that are required for a printer, see Required terminfo Items For a Printer.
Before you create a terminfo entry for a printer, make sure that none of the existing terminfo entries will support the printer. To do so, try to set up the printer with an entry for a similar printer, if a similar printer exists.
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
Determine a terminfo entry name for the printer.
The directories in the /usr/share/lib/terminfo directory contain all the valid terminfo entries. Use these entries as a guide for choosing a name for the printer.
Create a terminfo entry file for the printer.
Table 12–6 shows the items you must define in the terminfo entry to add a new printer to the LP print service. For more details about the structure of the terminfo database, see the terminfo(4) man page.
To help you start writing a new terminfo entry, use the infocmp command to save an existing terminfo entry to a file. This command is helpful if there is a terminfo entry that is similar to entry you want to create. For example, the following command saves the ps entry to the ps_cust file, which will become the new terminfo entry.
infocmp ps > ps_cust
Compile the terminfo entry file into the terminfo database.
# tic terminfo_entry
where terminfo-entry variable is the terminfo entry file you created.
Check for the new terminfo entry file in the /usr/share/lib/terminfo directory.