[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Guide to Printers and Printing

Printer Attachment Files

Attachment files provide a simple interface for developers of printer attachments to create System Management Interface Tool (SMIT) screens that support new printer attachments. To learn more about attachment files, see:

Each new attachment type is defined in an attachment file. The attachment file contains the name of SMIT object IDs used to perform various printing tasks. The name of an attachment type is limited to 10 characters.

Understanding the SMIT Interface

Attachment files direct the branching from SMIT menus to SMIT object IDs. Every attachment file controls the branching from some or all of these SMIT menu options:

For example, when the Add a Print Queue menu option is selected from a SMIT dialog screen, the first information required from the user is which attachment type is being used. The user selects the desired attachment type, and SMIT searches the attachment type file to discover which SMIT object ID file to branch to.

SMIT selectors and dialogs for new printer attachments must create dialogs that add, change, and remove a print queue for the new attachment type. The names of the new SMIT dialogs are placed in the attachment file. The dialog names in the file are automatically branched to when creating, changing, or removing queues for the new attachment type.

Attachment File Naming Conventions

Attachment files must be named according to the following naming convention:

Attachment_type.attach

The Attachment_type string must contain a unique string that identifies the attachment. All attachment files must be located in the /usr/lib/lpd/pio/etc directory. The following attachment files are supplied:

local.attach Contains the local system attached printers file.
xsta.attach Contains printers attached to Xstations file.
ascii.attach Contains ASCII-terminal attached printers file.
file.attach Contains the output-to-file attachment file.
remote.attach Contains the remote print queues attachment file.

Structure of Attachment Files

Attachment files are ASCII files. Each line in an attachment file defines a field using the following format:

FieldName = Value

The following field names have special meanings in the attachment file:

The following field names define SMIT selector IDs. The Value variable must contain a SMIT selector ID. The selector ID value of each field specifies the target of the branch. The SMIT fields are:

Every attachment file should contain the description , add_queue , and remove_queue fields. All other fields are optional. Fields with a null value are treated as if the field were missing. There is no restriction on the other contents of an attachment file.

The following example attachment file is named term_serv.attach :

description = term_serv.cat,1,3; Printer Attached to Terminal Server
seq_num = 2
submit_job = term_serv_start_job
add_queue = term_serv_add
add_printer = term_serv_printer
remove_queue = term_serv_remove
printer_conn = term_serv_printer_conn
change_queue = term_serv_change
change_filters = term_serv_change_filters
unsupported = ibm6252,ibm6262

Attachment File Field Definitions

The following field definitions detail the attachment type fields, formats for the field values, and practical examples of field values.

description Specifies the description string that appears on the SMIT Attachment type menu. The SMIT Attachment type menu lists all supported attachment types on the system. This field is required in order for the attachment type to appear on any list of supported types.

The format of the description field value is:

Message_catalog,Set,Message_#; DefaultTextString

Values for Message_catalog , Set , and Message_# are not required. For example, the two following example entries create the same menu item in SMIT. The first example uses the term_serv.cat message catalog, set number 1 , and message number 3 . If the message cannot be found, SMIT uses the default text in quotes. In the second example, no message catalog is designated, and the quoted message is used in the menu automatically:

description = term_serv.cat,1,3; Printer Attached to Terminal Server

description = Printer Attached to Terminal Server
seq_num Specifies the order in which a particular attachment type is displayed in the SMIT Attachment Type Selector menu. If this field is missing, the attachments are displayed in no particular order. For example, to display the attachment in the second position on the menu, type:
seq_num = 2
supported/unsupported Define a list of printer types that are either supported or not supported by the attachment. The supported field value is used to generate the list of printers supported by the attachment type on the SMIT dialog screen. The two fields are mutually exclusive.

The format of the value for the supported and unsupported fields is a comma-separated list of printer types. For example, to exclude the ibm6252 , ibm6262 , and ibm4029 printers from the list of supported printers, enter:

unsupported = ibm6252, ibm6262, ibm4029

To show the hplj-3 , hplj-3-si , and hplj-2 printers on the list of available printer types, type:

supported = hplj-3, hplj-3-si, hplj-2
submit_job Specifies the name of the SMIT selector ID to branch to in order to start a print job. If this field is missing, the enq dialog value is used. For example, to branch to the term_ser_start_job selector from the Start a Print Job menu option if the queue selected is of the term_serv attachment type, type:
submit_job = term_serv_start_job
add_queue Specifies the name of the SMIT selector ID to branch to in order to add a print queue. For example, to branch to the term_serv_add selector ID from the Add a Print Queue menu option, type:
add_queue = term_serv_add
add_printer Specifies the name of the SMIT selector ID to branch to in order to add a printer to an existing queue. Functionally, this adds an additional queue device to an existing queue. To branch to the term_serv_printer selector ID from the SMIT Existing Print Queue menu option, type:
add_printer = term_serv_printer
remove_queue Specifies the name of the SMIT selector ID to branch to in order to remove a print queue. The Remove dialog screen removes any other queues, queue devices, virtual printers, and printer devices that were created at the time the print queue was created. To branch from the Remove a Print Queue menu option to the term_serv_remove selector ID, type:
remove_queue = term_serv_remove
printer_conn Specifies the name of the SMIT selector ID to branch to in order to change the printer connection characteristics of a print queue. The port communication characteristics would typically be baud rate, parity, stop bits, and so on. To branch to the term_serv_printer_conn selector ID from the SMIT Printer Port Communication Characteristics menu option, type:
printer_conn = term_serv_printer_conn
change_queue Specifies the name of the SMIT selector ID to branch to in order to change the characteristics of a printer queue. To branch to the term_serv_change selector ID from the SMIT Change/Show Print Queue Characteristics menu option, type:
change_queue = term_serv_change
change_filters Specifies the name of the SMIT selector ID to branch to in order to change the pre-processing filters defined for a print queue. To branch to the term_serv_change_filters selector ID from the SMIT Change/Show Pre-Processing Filters menu option, enter:
change_filters = term_serv_change_filters

[ Previous | Next | Contents | Glossary | Home | Search ]