PRINTCAP(5) — FILE FORMATS
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 the Line Printer Spooler Manual in the Sun System Administration Manual for a discussion of how to set up the database for a given printer.
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:
Booleancapabilities 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.
Numericcapabilities 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 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.
Stringcapabilities 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’.
CAPABILITIES
NameTypeDefaultDescription
afstrNULLname of accounting file
brnumnoneif lp is a tty, set the baud rate (ioctl call)
cfstrNULLcifplot data filter
dfstrNULLTeX data filter (DVI format)
dustr0User ID of user ‘daemon’.
fcnum0if lp is a tty, clear flag bits (sgtty.h)
ffstr“\f"string to send for a form feed
foboolfalseprint a form feed when device is opened
fsnum0like ‘fc’ but set bits
gfstrNULLgraph data filter (plot(3X) format)
icboolfalsedriver supports (non standard) ioctl
call for indenting printout
ifstrNULLname of text filter which does accounting
lfstr“/dev/console"error logging file name
lostr“lock"name of lock file
lpstr“/dev/lp"device name to open for output
mcnum0maximum number of copies
mxnum1000maximum file size (in BUFSIZ blocks), zero = unlimited
ndstrNULLnext directory for list of queues (unimplemented)
nfstrNULLditroff data filter (device independent troff)
ofstrNULLname of output filtering program
plnum66page length (in lines)
pwnum132page width (in characters)
pxnum0page width in pixels (horizontal)
pynum0page length in pixels (vertical)
rfstrNULLfilter for printing FORTRAN style text files
rmstrNULLmachine name for remote printer
rpstr"lp"remote printer name argument
rsboolfalserestrict remote users to those with local accounts
rwboolfalseopen printer device read/write instead of read-only
sbboolfalseshort banner (one line only)
scboolfalsesuppress multiple copies
sdstr“/usr/spool/lpd"spool directory
sfboolfalsesuppress form feeds
shboolfalsesuppress printing of burst page header
ststr“status"status file name
tfstrNULLtroff data filter (cat phototypesetter)
trstrNULLtrailer string to print when queue empties
vfstrNULLraster image filter
xcnum0if lp is a tty, clear local mode bits (tty (4))
xsnum0like ‘xc’ but set bits
Error messages sent to the console have a carriage return and a line feed appended to them, rather than just a line feed.
If the local line printer driver supports indentation, the daemon must understand how to invoke it.
Note that 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 lineprinter daemon if the device is a tty. 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). For example, to set exactly the flags 06300 in the ‘fs’ field, do:
:fc#0177777:fs#06300:
The same process applies to the ‘xc’ and ‘xs’ fields.
SEE ALSO
termcap(5), lpc(8), lpd(8), pac(8), lpr(1), lpq(1), lprm(1)
The Line Printer Spooler Manual in the Sun System Administration Manual.
Sun Release 3.2 — Last change: 9 July 1985