PRINTCAP(7) UNIX 5.0 (14 February 1992) PRINTCAP(7)
NAME
printcap - printer capability data base
SYNOPSIS
/etc/printcap
DESCRIPTION
printcap is a simplified version of the termcap(5) data base
for describing printers. The spooling system accesses the
printcap file every time it is used, allowing dynamic
addition and deletion of printers. Each entry in the data
base describes one printer. This data base may not be
substituted for, as is possible for termcap, because it may
allow accounting to be bypassed.
The default printer is normally lp, though the environment
variable PRINTER may be used to override this. Each
spooling utility supports a -Pprinter option to explicitly
name a destination printer.
Refer to for a discussion of how to set up the database for
a given printer. On Motorola systems, refer to
CNEPAdmin.Guide for information on setting up printers with
the system and network administration program.
Each entry in the printcap file describes a printer, and is
a line consisting of a number of fields separated by `:'
characters. The first entry for each printer gives the
names which are known for the printer, separated by `|'
characters. The first name is conventionally a number. The
second name given is the most common abbreviation for the
printer, and the last name given should be a long name fully
identifying the printer. The second name should contain no
blanks; the last name may well contain blanks for
readability. Entries may continue onto multiple lines by
giving a `\' as the last character of a line, and empty
fields may be included for readability.
Capabilities in printcap are all introduced by two-character
codes, and are of three types:
Boolean Capabilities that indicate that the printer has
some particular feature. Boolean capabilities are
simply written between the `:' characters, and are
indicated by the word `bool' in the type column of
the capabilities table below.
Numeric Capabilities that supply information such as
baud-rates, number of lines per page, and so on.
Numeric capabilities are indicated by the word num
in the type column of the capabilities table
below. Numeric capabilities are given by the
Page 1 (printed 4/13/92)
PRINTCAP(7) UNIX 5.0 (14 February 1992) PRINTCAP(7)
two-character capability code followed by the `#'
character, followed by the numeric value. For
example:
:br#1200:
is a numeric entry stating that this printer
should run at 1200 baud.
String Capabilities that give a sequence which can be
used to perform particular printer operations such
as cursor motion. String valued capabilities are
indicated by the word str in the type column of
the capabilities table below. String valued
capabilities are given by the two-character
capability code followed by an `=' sign and then a
string ending at the next following `:'. For
example,
:rp=spinwriter:
is a sample entry stating that the remote printer
is named spinwriter.
Motorola DESCRIPTION
On Motorola systems, lpr(1N)andEmulexNetworkPrinting use the
printcap file for defining printer entries. The entry :zz:
is used to identify a printer attached to a Motorola host.
Refer to the Emulex Network Printer documentation for
information on the entries corresponding to network printers
attached to an Emulex server.
lpr creates the spooling directory for the printer
automatically if no spooling directory exists.
CAPABILITIES
c c l l cfB l l l. Name Type Default Description
af str NULL name of accounting file br num none if lp
is a tty, set the baud rate (ioctl call)
cf str NULL cifplot data filter df str NULL TeX data
filter (DVI format) du str 0 User ID of user `daemon'.
fc num 0 if lp is a tty, clear flag bits
ff str ``\f'' string to send for a form feed
fo bool false print a form feed when device is opened
fs num 0 like `fc' but set bits gf str NULL graph
data filter (plot(3X) format) hl bool false print the
burst header page last ic bool false driver supports
(non standard) ioctl to indent printout if str NULL name
of text filter which does accounting
lf str ``/dev/console'' error logging file name
lo str ``lock'' name of lock file
lp str ``/dev/lp'' device name to open for output
Page 2 (printed 4/13/92)
PRINTCAP(7) UNIX 5.0 (14 February 1992) PRINTCAP(7)
mc num 0 maximum number of copies ms str NULL list
of terminal modes to set or clear mx num 1000 maximum
file size (in BUFSIZ blocks), zero = unlimited
nd str NULL next directory for list of queues
(unimplemented) nf str NULL ditroff data filter (device
independent troff) of str NULL name of output filtering
program pc num 200 price per foot or page in hundredths
of cents pl num 66 page length (in lines)
pw num 132 page width (in characters)
px num 0 page width in pixels (horizontal)
py num 0 page length in pixels (vertical)
rf str NULL filter for printing FORTRAN style text files
rg str NULL restricted group. Only members of group
allowed access rm str NULL machine name for remote
printer rp str ``lp'' remote printer name argument
rs bool false restrict remote users to those with
local accounts rw bool false open printer device
read/write instead of read-only sb bool false short
banner (one line only) sc bool false suppress multiple
copies sd str ``/var/spool/lpd'' spool directory
sf bool false suppress form feeds
sh bool false suppress printing of burst page header
st str ``status'' status file name
tc str NULL name of similar printer; must be last
tf str NULL troff data filter (C/A/T phototypesetter)
tr str NULL trailer string to print when queue empties
vf str NULL raster image filter xc num 0 if lp is a
tty, clear local mode bits xs num 0 like `xc' but set
bits
If the local line printer driver supports indentation, the
daemon must understand how to invoke it.
Note: the fs, fc, xs, and xc fields are flag masks rather
than flag values. Certain default device flags are set when
the device is opened by the line printer daemon if the
device is connected to a terminal port. The flags indicated
in the fc field are then cleared; the flags in the fs field
are then set (or vice-versa, depending on the order of
fc#nnnn and fs#nnnn in the /etc/printcap file). The bits
cleared by the fc field and set by the fs field are those in
the sg_flags field of the sgtty structure, as set by the
ioctl call, and the bits cleared by the xc field and set by
the xs field are those in the local flags word, as set by
the ioctl call. See ttcompat(4M) for a description of these
flags. For example, to set exactly the flags 06300 in the
fs field, which specifies that the EVENP, ODDP, and modes
are to be set, and all other flags are to be cleared, do:
:fc#0177777:fs#06300:
The same process applies to the xc and xs fields.
Alternatively, the ms field can be used to specify modes to
Page 3 (printed 4/13/92)
PRINTCAP(7) UNIX 5.0 (14 February 1992) PRINTCAP(7)
be set and cleared. These modes are specified as stty(1V)
modes; any mode supported by stty may be specified, except
for the baud rate which must be specified with the br field.
This permits modes not supported by the older terminal
interface described in ttcompat(4M) to be set or cleared.
Thus, to set the terminal port to which the printer is
attached to even parity, tab expansion, no newline to
carriage-return/line-feed translation, and RTS/CTS flow
control enabled, do:
:ms=evenp,-tabs,nl,crtscts:
termcap(5) It is recommended that each type of printer have
a general entry describing common capabilities; then an
individual printer can be defined with its particular
capabilities plus a tc field that points to the general
entry for that type of printer.
FILES
/etc/printcap
SEE ALSO
lpq(1N), lpr(1N), lprm(1N), stty(1), lpc(1M), lpd(1M),
Page 4 (printed 4/13/92)