netlpr(1) CLIX netlpr(1)
NAME
netlpr - Digital Network Protocol (DNP) command to print file(s) on remote
printers
SYNOPSIS
netlpr [-q queue-spec] [-n node] [-u user] [-p password] [-a account] file
...
DESCRIPTION
The netlpr command is a DNP utility that prints any accessible text file
on any printer attached to a remote host supporting the Digital Network
Architecture (DNA), including the local node. The arguments to netlpr are
remote file specifications as described in netcp(1), optionally
interspersed with the following options:
[-q queue-spec]
Specifies for a CLIX host only, in the form of a remote file
specification, the printer on which to print all files specified,
up to the next -q option or the end of the command line. VAX hosts
can print to the default queue only. The form of queue-spec is as
follows:
[[node-spec["access-info"]::][queue-name]
The keywords have the following meaning:
node-spec
Specifies either a hostname or address as described in netcp(1).
If node-spec is not specified, queue-name refers to a local queue.
access-info
Specifies optional access control information used to access
queue-name on the remote host. The syntax of access-info is as
follows:
"[user [password [account]]]"
The user, password, and account are equivalent to the -u, -p, and
-a options. The meanings, as applied to remote file
specification, are as described in netcp(1).
-n node
Specifies the default node on which to search for subsequently
named files. The current default access control information
remains in effect.
-u user
2/94 - Intergraph Corporation 1
netlpr(1) CLIX netlpr(1)
Specifies the default username to use when accessing files on
remote nodes. The -u, -p, and -a options in netlpr have the same
meaning as the -u, -p, and -a options in netcp(1).
-p password
Specifies the default password to use when accessing files on
remote nodes.
-a account
Specifies the default account to use when accessing files on remote
nodes.
Configuration File
The netlpr program works with a local spooling program (see lp(1), lpr(1),
and qpr(1)) or a printer device driver. The interface to the local
spooling program or printer must be defined in the /usr/lib/netlpr.cf file
for netlpr to function.
For example, the netlpr.cf file for lpr(1) is as follows:
/usr/bin/lpr
Pr
The format of the configuration file using a spooling program is as
follows:
⊕ The first line contains the full pathname of the spooling program.
⊕ The first character of the second line indicates the option to use when
specifying a nondefault local printer. For example, if this character
is P, netlpr invokes the local spooler with the following command:
lpr -P printer file
If this facility is not provided by the local spooling program, this
character should be a space.
⊕ The second character of the second line indicates the option that
specifies that a file will be deleted after printing. If this facility
is not provided by the local spooling program, this character should be
a space.
The nondefault printer and delete options mentioned previously may be
members of this set. If no spooler options behave in this manner, a
single space should be inserted in this field.
If no spooling program is available, netlpr.cf should contain a single
line giving the name of the device in /dev to which printed output should
be sent. The name given should not start with a / (slash). For example,
2 Intergraph Corporation - 2/94
netlpr(1) CLIX netlpr(1)
if the device is /dev/lp, netlpr.cf should contain only the following:
lp
The netlpr command can be used as a replacement for lpr and then appears
to behave identically as long as the user prints only local files and does
not use any options specific to netlpr. The only requirement in this case
is that the local spooling program must remain present on the system and
netlpr.cf must contain a valid description of its location and
characteristics.
EXAMPLES
1. The following command prints file1 and file2 on the local default
printer:
netlpr file1 file2
2. The following command prints file1 on the local default printer and
file2 on the local printer named printer.
netlpr file1 -q printer file2
3. The commands issued by the previous example (using the sample
netlpr.cf above) are as follows:
lpr file1
lpr -P printer file2
4. The following examples are equivalent:
netlpr `nodea"joe montana"::file1'
netlpr -n nodea -u joe -p montana file1
Both examples print file1 on nodea (accessed with username joe and
password montana), on the local default printer. They then delete the
file after printing. The netlpr command copies the file to /tmp on
the local node and then issues the following command to lpr(1):
lpr -r /tmp/file1
5. The following command prints file1 from nodea on the local default
printer as in the previous example and prints file2 from nodeb, also
2/94 - Intergraph Corporation 3
netlpr(1) CLIX netlpr(1)
accessed with username doug and password flutie on the same printer:
netlpr `nodea"doug flutie"::file1' -n nodeb file2
6. The following command prints file1 and file2, both from nodea, and
accessed using the same access control information, on the local
default printer:
netlpr -n nodea -u dan -p marino file1 file2
7. The following command prints the local file file1 on the default
printer attached to node vax:
netlpr -q vax:: file1
8. The following command prints file1, on vax2, on the default printer
attached to vax1. It does this by copying the file to vax1 along with
a message specifying that it will be printed and subsequently deleted
when the copy is complete.
netlpr -q vax1:: vax2::file1
9. The following command prints the local file1 on printer lca0 attached
to node vax, a VMS node:
netlpr -q vax::lca0: file1
CAUTIONS
There is a known problem with using any spooler program that does not copy
the file to be printed to a saved area for the spooler. he spooler
program selected must (by default) copy the file to be printed when it is
being scheduled for printing. The lp(1) program does not copy the file by
default, but lpr(1) and qpr(1) do copy the file by default. The netlpr.cf
file indicates to netlpr the spooler to use.
RELATED INFORMATION
Commands: netcp(1), lpr(1), lp(1), qpr(1).
4 Intergraph Corporation - 2/94