The first part of this chapter describes how to use the lprsetup utility to add a print device and automatically set up the print environment. The second part of this chapter discusses the routine print services administration that you can perform, using either the lprsetup utility or by editing system files. The last part of this chapter contains detailed reference information about the lpd print daemon and the system files associated with the print services.
You can also use the SysMan printconfig command to perform some of these tasks. Note
Refer to the lprsetup
(8), lpc
(1), lpr
(1), lprm
(1), lpq
(1),
and lpstat
(1) reference pages for more information about these commands.
After a printer is set up and running on your system, you need to:
To use the lprsetup utility, you must have the Printer Support Environment subset installed. To see if you have this subset installed, enter:
# setld -i | grep OSFPRINTIf the OSFPRINT subset is installed, the following information is displayed:
OSFPRINT400 installed Local Printer Support (Printing Environment)
If the OSFPRINT subset is not installed, see the Installation Guide for information on adding this, or any, subset with the setld utility.
If your system is part of a network, you may need to consult your local network administrator about the correct procedure for adding a printer.
The following is a list of the information you need:
The following sections describe how you obtain the required information.
# lpr -PprinternameThe lprsetup program uses an internal numbering scheme from 0 to 99. The next available number is the default name. You can choose the default by pressing the Return key or by entering any other alphanumeric name that is appropriate. The lprsetup program always assigns at least two printer synonyms: the default number and 'lp default number', plus any others you specify. If the default number were 1, the two names would be '1' and 'lp1'. This printer could then be identified with 'lpr -P1' or 'lpr -Plp1'.
If you have only one printer or are entering the first of many printer names, the first name will have a printer number of 0. This is recognized as your system's default printer and will have an additional name of 'lp'. This means if you use the lpr command without specifying a specific printer this is the one it will use.
If this is the first printer connected to your system or a new printer added to an existing print system, create names that do not conflict with existing printer names. Ask your network administrator for the names of the remote printers on the network.
The supported printer types are defined in Table 11-1.
Printer Name | Abbreviation |
---|---|
LA50 | la50 |
LA70 Personal Printer | la70 |
LA75 Plus Companion Printer | la75 |
LA324 MultiPrinter | la324 |
LA424 MultiPrinter | la424 |
ColorMate PS | lf01r |
LG02 Line Printer | lg02 |
DEClaser 2200 | lg06 |
LG12 Impact Line Matrix Printer | lg12 |
LG31 Line Printer | lg31 |
LJ250 Companion Color Printer | lj250 |
LN03 Laser Printer | ln03 |
LN03 Laser Printer | ln03s |
DEClaser 2100 | ln05 |
DEClaser 2200 | ln06 |
DEClaser 1100 | ln07 |
DEClaser 3200 | ln08 |
DEClaser 5100 | ln09 |
LN03 PostScript Printer | ln03r |
DEClaser 2150 | ln05r |
DEClaser 2250 | ln06r |
DEClaser 1150 | ln07r |
DEClaser 3250 | ln08r |
DEClaser 5100 | ln08r |
IBM Proprinter | ibmpro |
NEC Silentwriter Model 290 | nec290 |
Epson FX-80 | fx80 |
Epson FX-1050 | fx1050 |
HP LaserJet Model IIP | hpIIP |
HP LaserJet Model IIIP | hpIIIP |
HP LaserJet Model IIID | hpIIID |
HP LaserJet Model IV | hpIV |
HP LaserJet Model 4M | hp4m |
any remote printer | remote |
default printer | unknown |
Responding with 'printer?' allows you to enter a mode where more information can be requested for each printer type. In this mode you are prompted to enter the same printer types as listed in the previous table. Information about the printer and the default printcap file entries for that printer are displayed. Enter 'quit' to return to the prompt to select the printer type being added.
When specifying the printer type, you must use full command names and printer names. The default printer type is 'unknown'.
To install third-party printers, consult the documentation that came with the printer.
The printer synonym is an alternate name for the printer. Some examples include 'draft', 'letter', and 'LA-75 Companion Printer'. You can enter as many alternate names for a printer as you like, but the total length of the line containing all the names must be less than 80 characters. When entering printer synonyms that can consist of many names, the entry process is terminated when you either enter a blank line or enter a line containing only white space.
After entering a synonym, you are prompted again. If you do not want to enter any more synonyms, press Return to continue.
Each synonym (including the printer number) identifies the printer to the print system. For example, if you chose the synonym 'draft' for a printer, the following command prints files on this printer:
$ lpr -Pdraft files
lp=/dev/lp
The installation procedure creates some device special files for the hardware that is connected to your computer. Usually, the device special files for parallel printers are named /dev/lpn (for example: lp1, lp2, lp3), and the device special files for serial line printers are named /dev/ttynn (for example: tty00, tty01, tty02). The n and nn variables specify the number of the printer.
When you use lprsetup, the program defaults to the next consecutive number when it sets up this file. For example, the default device pathname for the third serial line printer is /dev/tty03.
The default device special file is /dev/lp, which specifies a parallel printer.
For remote printers, you should specify a null argument with the lp symbol. For example:
lp=
If the port is used for logins, the lprsetup script turns off the terminal line established by the getty process so the terminal line can be used for a printer. Note
The af parameter is not applicable for remote printer entries because the accounting policy for remote printers is employed at their (remote) systems.
if=/usr/lbin/ln03rof of=/usr/lbin/ln03rofIf you want to use separate accounting files for each printer on your system, the file names must be unique. However, an unlimited number of printers can share an accounting file. You cannot specify an accounting file for remote printers.
Accounting files must be owned by the print daemon. If you specify an accounting file, intermediate directories are automatically created as needed.
Printer accounting does not work for PostScript files. Note
When the spooling directory is created, intermediate directories are created as necessary.
When the error log file is created, intermediate directories in the pathname are created as necessary.
The lprsetup program supplies the default value dev.
You specify a baud rate only for serial printers that are directly connected to your computer. Baud rates are not specified for printers connected to the console port or connected by a parallel port or LAT port.
Digital recommends that you accept the default values for an initial printer installation.
The printer described in the following example is an LN03R.
You can run the lprsetup program three ways:
# /usr/sbin/lprsetup Digital UNIX Printer Setup Program Command < add modify delete exit view quit help >:
The lprsetup command options are described in Table 11-2.
Command | Description |
---|---|
add | Adds a printer |
modify | Modifies an existing printer's characteristics |
delete | Removes an existing printer from your configuration |
exit | Exits from the lprsetup program |
view | Displays the current /etc/printcap file entry for the printer you are configuring |
quit | Exits from the lprsetup program |
help | Displays online help about the lprsetup program |
You can enter information at each prompt or press Return to select the default information provided. (In most instances, you can accept the defaults.) You can also enter a question mark (?) to get a description of the information you specify at the prompt.
Some of the symbols displayed in the lprsetup script are not supported by the Digital UNIX operating system. Refer to Table 11-4 and to the Note
printcap
(4) reference page for information on the supported symbols.
The following example shows how to use the lprsetup command to set up an LN03R printer to be used by the local system:
# /usr/sbin/lprsetup Digital UNIX Printer Setup Program Command < add modify delete exit view quit help >: add Adding printer entry, type '?' for help. Enter printer name to add [0] : [Return] For more information on the specific printer types enter `printer?' Enter the FULL name of one of the following printer types: la50 la70 la75 la324 la424 lg02 lg06 lg12 lg31 lj250 ln03 ln03s ln05 ln06 ln07 ln08 lf01r ln03r ln05r ln06r ln07r ln08r ibmpro nec290 fx80 fx1050 hpIIP hpIIIP hpIIID hpIV hp4m remote unknown or press RETURN for [unknown] : ln03r Enter printer synonym: tomf Enter printer synonym: [Return] Set device pathname 'lp' [] ? /dev/tty01 Do you want to capture print job accounting data ([y]|n)? y Set accounting file 'af' [/usr/adm/lpacct]?[Return] Set spooler directory 'sd' [/usr/spool/lpd] ? [Return] Set printer error log file 'lf' [/usr/adm/lperr] ? [Return] Set printer connection type 'ct' [dev] ? [Return] Set printer baud rate 'br' [4800] ? 9600
After you respond to each of the prompts, lprsetup prompts you to determine if you want to change any of the
values assigned to the various symbols in your /etc/printcap
file or if you want to specify any additional symbols. For example, you can
set a specific page length or width. If you want to make any changes or add
information, enter the appropriate symbol name. Refer to the printcap
(4)
reference page or Table 11-4 for more information on
the various symbols.
Enter the name of the printcap symbol you wish to modify. Other valid entries are: 'q' to quit (no more changes) 'p' to print the symbols you have specified so far 'l' to list all of the possible symbols and defaults The names of the printcap symbols are: af br cf ct df dn du fc ff fo fs gf ic if lf lo lp mc mx nc nf of op os pl pp ps pw px py rf rm rp rs rw sb sc sd sf sh st tf tr ts uv vf xc xf xs fo ic nc ps Da Dl It Lf Lu Ml Nu Or Ot Ps Sd Si Ss Ul Xf Enter symbol name: q Printer #0 ---------- Symbol type value ------ ---- ----- af STR /usr/adm/lpacct br INT 9600 ct STR dev fc INT 0177777 fs INT 03 if STR /usr/lbin/ln03rof lf STR /usr/adm/lperr lp STR /dev/tty01 mc INT 20 mx INT 0 of STR /usr/lbin/ln03rof pl INT 66 pw INT 80 rw BOOL on sd STR /usr/spool/lpd xc INT 0177777 xf STR /usr/lbin/xf xs INT 044000 Are these the final values for printer 0 ? [y] y
Next, the lprsetup script prompts you to add comments to the /etc/printcap file. Enter n at the prompt if you do not want to add comments. Enter y at the prompt if you want to add comments. At the pound sign (#) prompt, enter your comment. Press Return at the pound sign (#) prompt to exit. The comments will be insert directly above the printcap entry in the /etc/printcap file.
Adding comments to printcap file for new printer, type '?' for help. Do you want to add comments to the printcap file [n] ? : y # Use this printer for draft-only # [Return] Set up activity is complete for this printer. Verify that the printer works properly by using the lpr(1) command to send files to the printer. Command < add modify delete exit view quit help >: view
# Use this printer for draft-only pearly|lp0|3X27|tomw:\ :af=/usr/adm/lpacct:\ :br#9600:\ :ct=dev:\ :fc#0177777:\ :fs#03:\ :if=/usr/lbin/ln03rof:\ :lf=/usr/adm/lperr:\ :lp=/dev/tty01:\ :mc#20:\ :mx#0:\ :of=/usr/lbin/ln03rof:\ :pl#66:\ :pw#80:\ :rw:\ :sd=/usr/spool/lpd:\ :xc#0177777:\ :xf=/usr/lbin/xf:\ :xs#044000:
Command < add modify delete exit view quit help >: exit
Refer to the lprsetup
(8) reference page for more information on using
the program.
If you are setting up a remote printer from a remote machine, the local machine (the client) must be listed in the .rhosts file of the remote machine (the host).
If your printer will be connected to a remote LAT terminal server, ensure that the LAT subsets are installed as described in the Installation Guide. To see if the LAT subsets are installed, enter:
# setld -i | grep OSFLATSee the Network Administration guide for information on how to enable remote LAT terminal server printing.
lpr
(1) reference page for more information
on how to invoke these features. Table 11-4 lists the printcap symbol names, the type of values they take, default values,
and descriptions.The lptest command has the following syntax:
/usr/sbin/lptest[length[count]]
Use the lptest command if you need quick output of random data. For example:
# /usr/sbin/lptest |lpr -P3r44Refer to the
lptest
(8)
reference page for more information.
You should make sure that the /etc/inittab file does not invoke the getty process on serial lines that have printers attached. If you use the lprsetup script, this is done for you.
If you change the name of the spooling directory, the accounting file, or the error log file, lprsetup asks you to verify that the information is correct before it deletes the original information.
To manually modify a printer's configuration, edit the /etc/printcap file and modify the entry that pertains to the printer. Refer to Section 11.6.3 and to the printcap
(4) reference
page for information about the /etc/printcap file symbols.
To remove a printer, run the lprsetup program and choose the delete option from the main menu. The program prompts you for the printer name. Enter the name of the printer you want to remove. You are prompted for confirmation that you want to delete the error log file and the accounting file because these files can be shared by more than one printer. If you do have shared files, do not delete them. Section 11.4.2 describes how to use the lprsetup program.
If you have included comments for the printer in the first line of its /etc/printcap file entry, the lprsetup program does not delete them. You must edit the /etc/printcap file and delete the comments.
To manually remove a printer, edit the /etc/printcap file and delete the entry that pertains to the printer. You must also manually delete the accounting and log file and the spooling directory.
There are two types of printer accounting: printer user accounting and printer summary accounting. Printer user accounting provides information about printer use according to the machine and user name that issues the print request. Printer summary accounting provides information about the amount of media (number of printed pages or number of feet of roll paper or film) the printer produces. You specify the pac command with the -s option to produce printer summary accounting information.
The printer accounting files default to the /var/adm directory. If you use the lprsetup program to add a printer, the program creates the accounting file you specify. The /usr/adm/lpacct file is the default accounting file. If you add a printer manually, you must create the accounting file.
The /var/adm/printer directory should be owned by user adm and belong to group adm. The printer accounting files should have protection mode 644, be owned by user adm, and belong to group system. Note
Some lpc commands, for example, the disable command, require you to be superuser.
You can use the lpc command only to manage print queues that are local to your system. Although a remote printer has both a local queue and a remote queue, the lpc command manages only the local queue. Note
There are 15 command arguments that you can specify with the lpc command. You can also use the lpc command interactively. If you enter the lpc command without any command arguments, the lpc> prompt is displayed. You can then enter command arguments.
The lpc command has the following syntax:
/usr/sbin/lpc[argument] [all | printer . . .]
You can specify the argument variables defined in Table 11-3.
lpc Argument | Description |
---|---|
help [argument] | Prints a one-line description of the specified lpc command argument. If an argument variable is not specified, the list of arguments is displayed. |
? [argument] | Same as the help argument. |
abort | Terminates an active lpd daemon and then disables printing. This prevents the lpr or lp command from starting a new lpd daemon. |
clean | Removes any temporary files, data files, and control files that cannot be printed (for example, files that do not form a complete printer job) from the specified print spooling directory. |
disable | Turns off the specified print spooling queue. This prevents the lpr or lp command from entering new jobs in the queue. |
down message... | Turns off the specified print queue, disables printing, and enters the specified message in the printer status file. The message does not need to be quoted because remaining arguments are treated the same as echo. You can use the down argument to take down a printer and inform users. If a printer is down, the lpq command indicates that the printer is down. |
enable | Enables spooling for the specified printers. This enables the lpr or the lp command to enter print jobs in the spooling queue. |
exit | Exits from lpc. |
quit | Exits from lpc. |
restart | Attempts to start a new lpd daemon for the specified printer. This argument is useful if some abnormal condition causes the daemon to terminate unexpectedly and leave jobs in the queue. If this occurs, the lpq command indicates that no daemon is present. If a daemon is hung, you must first kill the process and then restart the daemon by using the restart argument. |
start | Enables printing and starts a spooling daemon for the specified printer. |
status [printer] | Displays the status of the specified printer daemon and queue. The status argument shows if the queue is enabled, if printing is enabled, the number of entries in the queue, and the status of the printer's lpd daemon. If a printer name is not supplied, information about all printer daemons and queues is displayed. |
stop | Stops a spooling daemon after the current job is complete and disables printing. |
topq printer | Puts print jobs in the queue in the specified order. You can specify the print jobs by also specifying a request_ID variable or a username variable. |
up | Enables all printing and starts a new printer daemon. Cancels the down argument. |
# /usr/sbin/lpc lpc> status tester tester: printer is on device '/dev/tty02' speed 9600 queuing is enabled printing is enabled 1 entry in spool area lpc>Refer to the
lpc
(8) reference page for more information.
After you install and boot your system, the lpd daemon is usually started by the init program. You can start the lpd daemon with the following command syntax:
/usr/lbin/lpd[-l]
The -l option causes the lpd daemon to log valid requests from the network. This option is useful for debugging.
To test whether the line printer daemon is running, enter:
# ps agx |grep /usr/sbin/lpd
If you are using lprsetup, the program supplies the default value /usr/spool/lpdn. The n variable specifies the printer number. For example, the default name of the spooling directory for a second line printer could be /usr/spool/lpd2. The default spooling directory for any printer is /usr/spool/lpd.
sd=/usr/spool/lpd/purple
Spooling directories must have the same parent directory name, which is normally /usr/spool.
When the lpd daemon is activated as a result of a
print request, it looks in the printer spooling directory for a lock file. If a lock file is not found, the lpd daemon creates one and writes the identification number and
the control file name on two successive lines in the file. The lpd daemon then scans the printer spooling directory for command
files whose names begin with cf. Command files specify
the names of user files to be printed and contain printing instructions for
the files. Each line in a command file begins with a key character that indicates
what to do with the remainder of the line. The key characters and their meanings
are described in detail in the lpd
(8) reference page.
# ls -l /var/spool/lpd/milhaus -rw-rw---- 1 root 75 Jan 17 09:57 cfA0220mothra -rw-rw---- 1 root 96 Jan 17 10:03 cfA143harald -rw-rw---- 1 root 199719 Jan 17 09:57 dfA0220mothra -rw-rw---- 1 root 9489 Jan 17 10:03 dfA143harald -rw-r--r-- 1 root 20 Jan 17 10:06 lock -rw-rw-rw- 1 daemon 113 Jan 17 10:00 status
# cd /var/spool/lpd # mkdir lp1 # chmod 775 lp1 # chgrp daemon lp1 # chown daemon lp1 # ls -l lp1 drwxr-xr-x 2 daemon daemon 24 Jan 12 1994 lp1
printcap
(4)
reference page. The lprsetup program modifies the /etc/printcap file. The following example shows an /etc/printcap entry for both a local printer and a remote printer:
# # lp|lp0|0|dotmatrix|mary:\ :af=/usr/adm/printer/lp.acct:\ :br#9600:\ :ct=dev:\ :fc#0177777:\ :fs#023:\ :if=/usr/lbin/la75of:\ :lf=/usr/adm/lperr:\ [1] :lp=/dev/tty01:\ :mx#0:\ :of=/usr/lbin/la75of:\ :pl#66:\ :pw#80:\ :sb:\ [2] :sd=/usr/spool/lpd:\ :xc#0177777:\ [3] :xf=/usr/lbin/xf:\ :xs#044000:\ # # sqirrl|3r3|ln03r3|postscript3|In office 2T20:\ :lp=:rm=uptown:rp=lp:sd=/var/spool/printer/ln03r3:mx#0:\ [4] #The callouts in the /etc/printcap entry show the following possible symbol syntaxes:
The printer reference name is the name that you subsequently use in order to specify printing to this printer. You can give each printer as many alternative reference names as you want, but each field on the first line must be separated with a vertical bar (|). The first line must end with a colon (:).
A local printer entry in the /etc/printcap file should have the default printer reference name lp0 so that print jobs can have a destination when printer reference names are not specified in print commands. Note
To make the /etc/printcap file easy to read, you can place a colon (:) at the beginning of a line and a backslash (/\) at the end of a line to separate the symbols.
Table 11-4 lists the printcap symbol names, the type of values they take, default values, and descriptions.
Symbol | Type | Default | Description |
---|---|---|---|
af | alphabetic | NULL | Name of accounting file |
br | numeric | none | If lp is a tty, set the baud rate (ioctl call) |
cf | alphabetic | NULL | The cifplot data output filter |
ct | alphabetic | NULL | Connection type ° |
df | alphabetic | NULL | The TeX data filter (DVI format) |
dn | alphabetic | /usr/lbin/lpd | Specifies a nonstandard daemon pathname |
du | numeric | none | Specifies a nonstandard daemon UID |
fc | numeric | 0 | If lp is a tty, clear flag bits (sgtty.h) |
ff | alphabetic | /f | String to send for a form feed |
fo | Boolean | false | Print a form feed when device is opened (to suppress all form feeds, specify both the fo and sf symbols) |
fs | numeric | 0 | If lp is a tty, set flag bits |
gf | alphabetic | NULL | Graph data filter (plot format) |
ic | Boolean | false | Driver supports (nonstandard) ioctl to independent printout |
if | alphabetic | NULL | Accounting text filter |
lf | alphabetic | /dev/console | Error log file name |
lo | alphabetic | lock | Name of lock file |
lp | alphabetic | /dev/lp | Printer device logical name ° |
mc | numeric | 20 | Specifies the maximum number of copies allowed |
mx | numeric | 1000 | Maximum file size (in BUFSIZ blocks), zero (0) removes size restriction |
nf | alphabetic | NULL | The ditroff data filter (device independent troff) |
of | alphabetic | NULL | Output filtering program |
op | alphabetic | NULL | Entry in the reference name field for LAT port characteristics |
Symbol | Type | Default | Description |
---|---|---|---|
os | alphabetic | NULL | Service name supported on some terminal servers |
pl | numeric | 66 | Page length (in lines) |
pp | alphabetic | NULL | The print command filter replacement |
ps | alphabetic | non_PS | Indicates that the printer is PostScript |
pw | numeric | 132 | Page width (in characters) |
px | numeric | 0 | Page width in pixels (horizontal) |
py | numeric | 0 | Page length in pixels (vertical) |
rf | alphabetic | NULL | The FORTRAN-style text file filter |
rm | alphabetic | NULL | Machine name for remote printer ° |
rp | alphabetic | lp | Remote printer name argument |
rs | Boolean | false | Restrict remote users to those with local accounts |
rw | Boolean | false | Open the printer device for reading and writing |
sb | Boolean | false | One-line banner |
sc | Boolean | false | Suppress multiple copies |
sd | alphabetic | /usr/spool/lpd | Spool directory |
sf | Boolean | false | Suppress all form feeds, except those that are in the file |
sh | Boolean | false | Suppress printing of burst page header |
st | alphabetic | status | The status file name |
tf | alphabetic | NULL | The troff data filter (catphototypesetter) |
tr | alphabetic | NULL | Print trailing string if queue empties (the trailing string can be a series of form feeds or an escape sequence) |
ts | alphabetic | NULL | LAT terminal server node name. |
vf | alphabetic | NULL | The raster image filter (you can also specify raster filters with the if and of symbols) |
xc | numeric | 0 | If lp is a tty, clear local mode bits (tty) |
xs | numeric | 0 | If lp is a tty, set local mode bits |
You can specify an accounting filter with the if symbols and an output filter with the of symbol. Output filters filter text data to the printer device if accounting is not enabled or if text data must be passed through a filter. For example:
if=/usr/lbin/ln03rof of=/usr/lbin/ln03rof
Refer to the lpd
(8) reference page for more information on using
filter capabilities.
Table 11-6 lists the available print filters located in the /usr/lbin directory.
Filter Name | Description |
---|---|
epsonof | Epson FX-80 and FX-1050 printers |
hplaserof | NEC Silentwriter Model 290 and most Hewlett Packard LaserJets |
hplaserpsof | Hewlett Packard PostScript-equipped LaserJets |
hplaser4psof | Hewlett Packard LaserJet Model 4M only |
lpf | Line printer filter (LP25, LP26, LP27, LP29, LG01, LA210, LQP02, LQP03) |
lqf | Letter-quality filter (LQP02, LQP03) |
la75of | Dot matrix printer filter (LA75, LA70, LA324, LA424) |
lg31of | LG31 line printer filter |
lg02of | LG02 ink jet printer filter |
ln03of | LN03 laser printer filter |
ln03rof | LN03 ScriptPrinter filter |
ln03rof_isolatin1 | LN03 ScriptPrinter filter with ISO Latin_1 encoding |
ln03rof_decmcs | LN03 ScriptPrinter filter with DEC multinational character set encoding |
ln05of | DEClaser 2100 laser printer filter |
ln05rof | DEClaser 2150 PostScript printer filter |
ln05rof_isolatin1 | DEClaser 2150 PostScript printer filter with ISO Latin_1 encoding |
ln05rof_decmcs | DEClaser 2150 PostScript printer filter with DEC multinational character set encoding |
Filter Name | Description |
---|---|
ln06of | DEClaser 2200 laser printer filter |
ln06rof | DEClaser 2250 PostScript printer filter |
ln06rof_isolatin1 | DEClaser 2250 PostScript printer filter with ISO Latin_1 encoding |
ln06rof_decmcs | DEClaser 2250 PostScript printer filter with DEC multinational character set encoding |
ln07of | DEClaser 1100 laser printer filter |
ln07rof | DEClaser 1150 PostScript printer filter |
ln07rof_isolatin1 | DEClaser 1150 PostScript printer filter with ISO Latin_1 encoding |
ln07rof_decmcs | DEClaser 1150 PostScript printer filter with DEC multinational character set encoding |
ln08of | DEClaser 3200 laser printer filter |
ln08rof | DEClaser 3250 PostScript printer filter |
ln08rof_isolatin1 | DEClaser 3250 PostScript printer filter with ISO Latin_1 encoding |
ln08rof_decmcs | DEClaser 3250 PostScript printer filter with DEC multinational character set encoding |
ln09of | DEClaser 5100 PostScript printer filter |
ln09of_isolatin1 | DEClaser 5100 PostScript printer with ISO Latin_1 encoding |
ln09of_decmcc | DEClaser 5100 PostScript printer with DEC multinational character set encoding |
lj250of | LJ250 DEColorwriter filter |
Delays are specific times used to slow the transmission of the next group of characters to the input buffer. Delays give the printer mechanism time to perform operations such as a carriage return, newline, tab, and form feed.
Flag bits are cleared with the fc symbol and set with the fs symbol. All printers do not use all the flag bits, but you must either set the bits or clear them. You should consult your printer manual for specific information about flag bits.
The flag bits are specified as octal numbers in a 16-bit word. Octal values are preceded with the number zero (0). To clear all the bits, specify the value 0177777 with the fc symbol. To set all the bits, specify the value 0177777 with the fs symbol. All bits should be cleared (using fc#0177777) before calling the fs symbol. To set or clear any groups of bits, specify the octal sum of the combined bits for the number of flag bits.
The following is an example of flag bit specifications:
fc#0177777 fs#0141As shown in the previous example, fc#0177777 clears all bits. The fs symbol set to 0141 specifies the OPOST, ONLRET, and OFILL flag bits.
Table 11-8 lists each flag bit name, its octal value, and its description.
Flag | Octal Value | Description |
---|---|---|
OPOST | 0000001 | Enable output processing |
ONLCR | 0000002 | Map NL to CR-NL |
OLCUC | 0000004 | Map lower case to upper case |
OCRNL | 0000010 | Map CR to NL |
ONOCR | 0000020 | No CR output at column 0 |
ONLRET | 0000040 | NL performs CR function |
OFILL | 0000100 | Use fill characters for delay |
OFDEL | 0000200 | Fill is DEL, else NUL |
NLDLY | 0001400 | Newline delay |
NL0 | 0000000 | |
NL1 | 0000400 | |
NL2 | 0001000 | |
NL3 | 0001400 | |
TABDLY | 0006000 | Horizontal tab delay |
TAB0 | 0000000 | |
TAB1 | 0002000 | |
TAB2 | 0004000 | |
TAB4 | 0006000 | |
CRDLY | 0030000 | Carriage Return delay |
CR0 | 0000000 | |
CR1 | 0010000 | |
CR2 | 0020000 | |
CR3 | 0030000 | |
FFDLY | 0040000 | Form feed delay |
FF0 | 0000000 | |
FF1 | 0040000 | |
BSDLY | 0100000 | Backspace delay |
BS0 | 0000000 | |
BS1 | 0100000 | |
OXTABS | 1000000 | Expand tabs to spaces |
Refer to the tty
(7) reference page for detailed information on flag
bits.
Refer to the tty
(7) reference page for a detailed description of
the status bits.
The following is an example of mode bits specifications:
xc#0177777 xs#044000As shown in the previous example, xc#0177777 clears all bits. The xs symbol set to 0110 specifies the ECHO and ECHOCTL mode bits.
Table 11-9 lists a description of each mode bit.
Mode | Octal Value | Description |
---|---|---|
ECHOKE | 0000001 | Echos KILL by erasing the line |
ECHOE | 0000002 | Visually erase characters |
ECHOK | 0000004 | Echoes NL after KILL |
ECHO | 0000010 | Enable echoing |
ECHONL | 0000020 | Echoes NL even if ECHO is off |
ECHOPRT | 0000040 | Echo erased chars between and / |
ECHOCTL | 0000100 | Echo control characters as ^(char) |
ISIG | 0000200 | Enable special chars INTR, QUIT and SUSP |
ICANON | 0000400 | Enable canonical input |
ALTWERASE | 0001000 | Use alternate word erase algorithm |
IEXTEN | 0002000 | Enable FLUSHO and LNEXT |
XCASE | 0040000 | Canonical upper/lower presentation |
On the local machine attached to the printer you must specify the rs symbol, which specifies a Boolean value that takes only a true (yes) or false (no) value, along with the other printer configuration symbols. If you define the value as true, remote users must have an account on the local machine that is attached to the printer. If you define the value as false, remote users can access the local printer if the local printer is listed in the .hosts file. Refer to Section 11.6.3 for an example of an /etc/printcap file.
On the remote machine that will use the printer, you must specify the rm, rp, lp, and sd symbols.
The rm symbol specifies the name of the machine attached to the printer. For example:
rm=deccom
The rp symbol specifies the printer spool name on the remote system. For example:
rp=ln03lab
For remote printers, you should specify the lp symbol without a value:
lp=The sd symbol specifies the spooling directory. For example:
sd=/usr/spool/lpd
For line printers, the pl and pw parameters specify the page length in number of lines (default is 66) and the column width in number of constant-width characters (default is 132), respectively. For example:
pl#55 pw#70
You should not specify a width of more than 80 characters for a letter-quality printer that uses 8 1/2-inch by 11-inch paper. If you specify a width that is greater than 80 characters on a printer, the page prints in landscape mode.
For high-resolution laser-type printers, the line length and page width parameters are py and px, which specify the number of pixels along the y- and x-coordinate planes of the printer output image area. Some printers can operate in either constant-width or imaging modes, so you must specify both sets of parameters. For example:
px#60 py#80
Refer to your printer's manual for its output characteristics.
# ps agx |grep /usr/sbin/lpdIf the daemon is not running, restart it by using the following commands:
# rm -f /dev/printer /var/spool/lpd.lock # /usr/lbin/lpd -lThe first command removes the /dev/printer and /var/spool/lpd.lock files. In the second command, the -l option causes the daemon to log requests from the network. This flag is useful for debugging problems with remote printers.
The error log file is specified with the lf symbol in the /etc/printcap file. For example:
lf=/var/adm/lpderrs
With TCP/IP printing, the local host manages print jobs in the same manner as it would manage print jobs for a local printer. The only difference is that with TCP/IP printing, the local print daemon (lpd) communicates with the remote printer over TCP/IP (similar to LAT printing). Each printer listens for connection requests on a socket number that is specified in the printer hardware or that is user-defined through the printer console.
Although multiple hosts can talk to a single printer connected to the network in this way, the hosts are handled on a first-come, first-served basis. Therefore, TCP/IP printing is not the same as remote printing, in which the remote printer manages a print queue on the remote site and listens for network connections on socket 515 (as specified in the entry for printer in /etc/services).
Printer | Socket Number |
---|---|
DEClaser 3500 (LN14) | 10001 |
DEClaser 5100 (LN09) | 10001 |
HP Laserjet 4m+ | 9100 |
LN17 | 2501 |
ct=tcp lp=@nodename /servicenameReplace nodename with the name of the printer's node as registered for use on your network and replace servicename with the name you will choose to enter in the /etc/services database in the next step. If you want to modify an existing /etc/printcap printer entry to use TCP/IP printing, edit the /etc/printcap file using a text editor, such as vi, and modify the values for the ct and lp variables. You can also remove the values for the xs, xc, fs, and fc control variables which establish settings that are relevant to the serial port driver. These are ignored by the network socket driver.
declaser3500 10001/tcpNote that the user-defined declaser3500 string represents the service; it is the same string that you would have entered as the servicename in the /etc/printcap file in step 2a. After saving the changes to the /etc/services file, restart the inetd daemon to reload the /etc/services file with the printer information you just added. To do this, type the following command:
# rcinet restartThis stops and restarts the Internet network services on your system.
In addition, printing non-PostScript files with some PostScript and non-PostScript filters may yield unexpected results. Table 11-11 lists the filters with which you could experience these problems.
Filter Name | Filter Type |
---|---|
lpf | Non-PostScript |
la75of | Non-PostScript |
la324of | Non-PostScript |
lqf | Non-PostScript |
hplaserof | PostScript |