AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  Printer Question

    Posted Tue October 09, 2007 10:12 AM

    Originally posted by: SystemAdmin


    Is it possible to copy the attributes of one printer and use it for other printers, whether new installs or just updating through smitty? Also, is there a specific administration forum here?
    #AIX-Forum


  • 2.  Re: Printer Question

    Posted Tue October 09, 2007 11:16 AM

    Originally posted by: SystemAdmin


    Probably the easiest way to clone the attributes is to create a new predef file using the piopredef file. I think I included the instructions for the AIX 5L Printing for Fun and Profit, but here is an example

    Procedure one: New 4039 queue
    For the following example we will make a new PCL virtual printer from queue pcl4039 and queue device lp0.
    Modify the virtual printer using lsvirprt.
    Create a new predef file from the existing virtual printer.

    Make sure that the name for the new file is unique. This means that you need to give a new type to the printer or a new datastream. Which you do depends on how you want the printer to show up when you add a new virtual printer.

    The command to create the new predef file is:
    piopredef -q queue -d qdev -t newtype -s stream
    New data stream
    The predef file will end in the name you give it for the data stream. This new virtual printer will come up as one of the options when adding the parent data type. For example 'ps', 'pcl', and 'gl' are all data streams for a 4039 printer. You are asked to give a name to each one. You could add 'lan' for a landscape virtual printer you might build. The printer type in AIX 4.1 begins with the printer company identifier.
    piopredef -q ps4039 -d lp0 -t 4039 -s lan (AIX 3)
    piopredef -q ps4039 -d lp0 -t ibm4039 -s lan (AIX 4)
    New printer type
    The predef file will begin with the new name you give it. This new virtual printer will come up as one of the printers you select when adding a new printer. Start the new name with the printer manufacturer name like hp, lex or ibm so that it will show in that group of printer. Call the new type checks
    piopredef -q ps4039 -d lp0 -t check -s pcl (AIX 3)
    piopredef -q ps4039 -d lp0 -t ibmcheck -s pcl (AIX 4)

    Edit the predef file to change the appropriate text.
    New data stream
    Change to mA attribute. This is the attribute used for specifing the data stream type when adding a virtual printer.
    :330:mA::PCL 2UP Landscape queue
    New description
    Change to mL attribute. This is the attribute used for specifing the description for the printer type in the mkvirprt list.
    :331:mL::IBM 4039 Check Printer
    Change the mN attribute to the newtype.
    :295:mN::check

    Add a virtual printer with mkvirprt or smit mkpq. Select the new printer you have chosen.
    Example of new printer option created:
    ibm6400 IBM 6400 Printer
    ibm7372 IBM 7372 Color Plotter
    ibmcheck IBM 4039 Check Printer
    Other (Select this if your printer type is not listed above)

    Later when adding queues you will see:
    Entry Fields
    Description IBM Check Printer
    Printer name lpx

    • Name of new PRINT QUEUE to add []

    This file can be taken to other systems to create new queues, but is not good for old queues.

    For old queues that you want to change, you are best to get the attributes with lsvirprt -q queuename -d devname > /tmp/myattr
    Do this with the old printer too and then diff to find the different attributes and then use a chvirprt -q queuename -d devname -a attributename=value for the attributes that are different. You can put that in a script.

    #AIX-Forum