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

Adding a Printer Using the Printer Colon File

Prerequisite Tasks or Conditions

Procedure

  1. Select the supported printer that the new printer most closely emulates. You might need to consult the printer documentation.
  2. 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.
  3. 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
  4. Display the output from the lsvirprt command, either in another window or as a hardcopy printout.
  5. Compare the attribute descriptions and values to those of the printer you are adding. Determine the changes to be made.
  6. 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 ).
  7. Change the attribute values in the colon file as described in "Adding a New Printer Type" in AIX Version 4.3 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).
  8. 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.
  9. Verify that the newly defined printer prints correctly.
  10. If you want to create a predefined virtual printer definition, do so with the piopredef command.
    %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 .

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