[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Commands Reference, Volume 3

mkvirprt Command

Purpose

Makes a virtual printer.

Syntax

mkvirprt [ -A AttachmentType ] -d QueueDevice -n Device -q PrintQueue -s DataStream -t PrinterType -T

mkvirprt -A AttachmentType

Description

The mkvirprt command creates a virtual printer definition and assigns it to the specified print queue and queue device. A virtual printer definition is a set of attribute values that describe a particular data stream for a particular printer. Before a print job can be queued with the enq command, qprt command, lp command, or lpr command, a virtual printer definition must be created for the printer's print queue and queue device.

Printers that support only one printer data stream, such as the 4201-3 Proprinter III, need only one virtual printer defined. Printers that support multiple printer data streams, such as the IBM 4216-31 Page Printer II, need a virtual printer defined for each data stream.

To create a virtual printer definition for a printer attached to an ASCII terminal, use the -T flag with the mkvirprt command.

After a virtual printer definition is created, its attribute values can be displayed with the lsvirprt command and changed with the chvirprt command.

The mkvirprt command becomes interactive if only the -A flag is specified with the command. Prompts are issued requesting the necessary parameter values. Prerequisite spooler queues and spooler queue devices are generated automatically, and all virtual printer definitions needed for the printer are defined with a single invocation of the mkvirprt command for the specified attachment type.

When the first prompt asks for a device name, if the device name entered is not that of a printer, or if an * (asterisk) precedes the device name, a list of printers is displayed. Otherwise, the printer type is assumed to be the same as that of the device.

Also, when a prompt asks for a print queue name, the queue name entered may optionally be followed by a colon and a queue device name. If no queue device name is provided, the queue device name is assumed to be the same as the device name.

Note: Queue and device names must begin with an alphabetic character.

You can use the Web-based System Manager Printer Queues application (wsm printers fast path) to run this command. You could also use the System Management Interface Tool (SMIT) smit mkvirprt fast path to run this command.

Flags

-A AttachmentType Specifies the type of printer attachment. The most common values for the AttachmentType variable value are:
Attachment Type Represents
local Locally connected printers
remote Remote print queues
xstation Printers connected to an Xstation
ascii Printers attached to an ASCII terminal
file Print output redirected to a regular file.

This flag is optional, and if the -A flag is not specified the default attachment type is file. If the -A flag is the only flag specified on the command line, the mkvirprt command goes into interactive mode and executes steps specified in the corresponding .config file.

-d QueueDeviceName Specifies the name of an existing queue device to which the virtual printer is assigned.
-n DeviceName Specifies the name of the printer device. Device names include lp0 for printer 0, lp1 for printer 1, and so on.
-q PrintQueueName Specifies the special file name of an existing print queue to which the virtual printer is to be assigned. Note that you do not have to specify the path name to the file, such as the /dev/lp0 file, you just need to specify lp0.
-s DataStreamType Specifies the printer data stream type. Data stream types include:
Type Description
asc Extended ASCII
ps PostScript
pcl Hewlett-Packard PCL
630 Diablo 630
855 Texas Instruments 855
gl Hewlett-Packard GL
kji Kanji
-t PrinterType Specifies the printer type. Printer types include 4201-3, ti2115, and so on. For more information on available printer types, see "Printer Support Provided" and "Printer Specific Information" in AIX Version 4.3 Guide to Printers and Printing.
-T Specifies that the printer is attached to an ASCII terminal.

Examples

  1. To make a virtual printer for the asc printer data stream for the 4029 printer attached locally, enter:
    mkvirprt -A local -d mypro -n lp0 -q proq -s asc -t 4019
  2. To make a virtual printer for a printer connected to an ENA 4033 network adapter, and to be prompted for the parameter values, enter:
    mkvirprt -A ena

Files

/usr/sbin/mkvirprt Contains the mkvirprt command.
/etc/qconfig Contains configuration files.
/usr/lib/lpd/pio/predef/* Contains predefined printer attribute files.
/var/spool/lpd/pio/@local/custom/* Contains customized virtual printer attribute files.
/usr/lib/lpd/pio/etc/*.attach Contains attachment type files.
/usr/lib/lpd/pio/etc/*.config Contains the configuration file for the printer.
/var/spool/lpd/pio/@local/ddi* Contains digested virtual printer attribute files.

Related Information

The chvirprt command, lp command, lpr command, lsvirprt command, mkque command, mkquedev command, qprt command, rmvirprt command.

The /etc/qconfig file.

Setting up and running Web-based System Manager in AIX Version 4.3 System Management Guide: Operating System and Devices.

Printer Overview for System Management in AIX Version 4.3 Guide to Printers and Printing.

Spooler Overview for System Management in AIX Version 4.3 Guide to Printers and Printing.

Adding Support for Configuring a Network-Attached Printer in AIX Version 4.3 Guide to Printers and Printing.

Printer Specific Information in AIX Version 4.3 Guide to Printers and Printing.

Printer Support in AIX Version 4.3 Guide to Printers and Printing.

Virtual Printer Definitions and Attributes in AIX Version 4.3 Guide to Printers and Printing.

Printer Addition Management Subsystem: Programming Overview in AIX Kernel Extensions and Device Support Programming Concepts.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]