SELECTLP

Section: User Commands (1)
Updated:
Index
Return to Main Contents
 

NAME

selectlp - select lp printer device type  

SYNOPSIS

selectlp  

DESCRIPTION

Selectlp is only installed on systems that use the lpr(1) printer spooler to print output, rather than the System-V style lp spooler. On these systems, a substitute lp program is installed, which processes its arguments and input, and passes it on to the lpr spooler for printing. Selectlp configures the system such that this substitute lp program knows which interface program it should use for the chosen lpr printer.

To begin with, selectlp makes sure the interface programs are installed. These interface programs handle all the device dependent details of printing out HPGL or gpsras graphics on various types of printers. If they are not in place, in the directory /usr/neuro/lib/lprmodels, it generates them from the model interface program source in /usr/neuro/src/lputil/models. If it can't do this, or if the substitute lp program is not installed, it gives an error message and quits. Normally, all these details are looked after during the software installation, so they shouldn't come up afterward, when adding or reconfiguring printers.

Selectlp does not take command line arguments. Instead, it prompts for its input. The first thing it asks for is the name of the printer to add or change. This should match one of the names defined in your /etc/printcap file, as one of the valid lpr destinations. The exception to this is the name "default", which selects the interface to be used when an lpr destination is not explicitly selected. If the default entry has not been defined yet, that is the one that selectlp will work with, rather than asking for the name of the printer.

It then displays all available printer types, and asks for the number corresponding to your printer type. There is an interface program that corresponds to each type. When you enter the number, it sets up a link to the interface for the chosen type, which will be used by the substitute lp program when you print to this printer. Entering a 0 will delete the current link for this printer.

On Silicon Graphics (SGI) systems, there may be both lp and lpr spoolers. For this reason, the installation procedures for this software give a choice between installing lp interface programs, or configuring the software to use the lpr spooler. If you choose not to use the lpr spooler, neither selectlp nor the substitute lp program are installed. If you choose to use lpr, the substitute lp program from this package is named lpvialpr, to avoid any conflicts with the real lp(1) command.  

ENVIRONMENT

Although selectlp doesn't use environment variables itself, other than PATH and NEURODIR, the substitute lp program does make use of environment variables to select the printer destination. As for the System-V lp command, this program uses LPDEST to select the default destination for printer output, from sdump or directly from lp. The hardcopy command sends output to the "plotter" destination by default, which the substitute lp command maps to the default destination for lpr. ( Hardcopy is not affected by the LPDEST variable, but uses the PLOTTER variable instead.)

In absence of an explicit destination, or a default provided by one of the above variables, the substitute lp program falls back to the default for lpr, which can be selected via the PRINTER environment variable. If even this is not set, it will use the interface program defined for the name "default", and will print via lpr's system-defined default destination. This is usually named "lp", but may be something different on some systems. It is usually a good idea to use selectlp to define the type for both the name "default" and this system-dependent default destination (e.g. "lp"), the latter because it may be selected explicitly by the LPDEST or PRINTER environment variable.

Note that if neither LPDEST nor PLOTTER is defined, then the PRINTER variable picks the default for both sdump and hardcopy, but either of the first two variables will override the PRINTER variable for the command it affects.  

FILES

/usr/neuro/src/lputil/models directory of models

/usr/neuro/lib/lprmodels               directory of interface programs

/usr/neuro/spool/lp.*          current links to interface programs

/usr/neuro/bin/lp                      substitute lp program

/usr/neuro/bin/lpvialpr                substitute lp program on SGI systems
 

SEE ALSO

lpr(1), hardcopy(1), sdump(1)
 

Index

NAME
SYNOPSIS
DESCRIPTION
ENVIRONMENT
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 20:21:29 GMT, November 21, 2017
Copyright © G. R. Detillieux, Spinal Cord Research Centre, The University of Manitoba.