You can use the printer colon file to add a printer.
Ensure that the following prerequisites are met before using
the printer colon file to add a printer:
- The printer must be physically attached to your system.
- Compare the similarities and differences between the printer you
want to add and the currently supported printers. To see a list of
supported printers, use the lsdev (list
devices) command.
- You must understand the
printer colon files and their format. Printer colon file conventions lists
the conventions for printer and attribute names and values in colon
files.
- Select the supported printer that the new printer most
closely emulates. You might need to consult the printer documentation.
- Use the mkvirprt command
to create a virtual printer definition by entering: mkvirprt.
Respond to the prompts, specifying the printer type you
selected. Remember that all device names and queue names must begin
with an alphabetic character.
- Review the attribute values and descriptions with the lsvirprt command. Because
you will need to compare these values in a later step, redirect the
output to a temporary file by entering:
lsvirprt -q QueueName -d QueueDeviceName > tempfile
- Display the output from the lsvirprt command,
either in another window or as a hardcopy printout, and compare the
attribute descriptions and values to those of the printer you are
adding. Determine the changes to be made.
- Copy the printer colon file from the Predefined Database
directory (/usr/lib/lpd/pio/predef) to the Customized
Database directory (/var/spool/lpd/pio/@local/custom).
- Change the attribute values in the colon file as described
in "Adding a New Printer Type" in Kernel Extensions and Device Support Programming Concepts. These will include
the printer type (mt attribute), the printer description (mL attribute),
and the printer-emulation mode (ep attribute).
- Run the chvirprt command,
specifying the queue name and the queue device name with no attribute
values.
This action causes a digested version of
the virtual printer definition to be built.
- Verify that the newly defined printer prints correctly.
- If you want to create a predefined virtual printer definition,
do so with the piopredef command.
Item |
Descriptor |
%Sxx |
Pushes a pointer to the current string value for the xx attribute
onto the stack. The only operation that can be performed on the string
pointer is to use %= to compare the string with another string
whose pointer is also on the stack. |
%Lxx |
Pushes the length of the xx constant or variable string
onto the stack. For example, if the value of attribute ss is IJKLMN,
the sequence ABC%Lss%dDEFG produces the string ABC6DEFG.
However, if xx is the attribute that contains the %Lxx sequence,
the length will be the length of that part of the string that has
been constructed when the %Lxx is encountered. For example,
if the value of the st attribute is ABC%Lst%dDEFG, the
constructed string for attribute st is ABC3DEFG. |