uprint.conf - Configuration file for Uprint
uprint-newconf - Adjust filenames and links to conform to uprint.conf
uprint-newconf [--remove] [--force] [--help] [--version]
The Uprint system was written for use on computers which have more than one print spooler installed. The Uprint system is a set of program to submit print jobs, view queues, and cancel print jobs. Whenever one of these programs is run it determines which queue has been selected. It then searches each of the print spooling systems it knows about and if it finds the requested queue, performs an appropriate action. Often this action will be invoking the spooler's own program for submitting a jobs, listing a queue, or deleting a job.
The Uprint system knows about the BSD spooler, the System V spooler, and PPR. It also has a configuration file (uprint-remote.conf) which lists queues on remote spoolers with which it can communicate directly using the LPR/LPD protocol (RFC 1179). The format of this file is described in the uprint-remote.conf(5) man page.
The spooling systems are searched in a fixed order. PPR comes first, then System V LP (if present), then BSD LPR (if present). As a last resort, uprint-remote.conf is searched. The first spooler found to have a queue with the specified name is used.
The Uprint programs are designed as drop-in replacements for common Unix printing programs. These programs are uprint-lp(1), uprint-lpr(1), uprint-lpq(1), and uprint-lprm(1). If you use them this way then you must rename the origional programs and tell Uprint what you have named them so that it can find them when it needs to execute them for you. The way to do this will be explained in the next two sections.
The Uprint library can also be used by other programs which need to print to more than one kind of spooler. The lprsrv program supplied with PPR uses the Uprint library to dispatch jobs.
This configuration file tells Uprint where to find the programs it needs to run. This file is normally found in the /etc/ppr directory.
This file is divided into sections. Each section starts with a section heading. A section heading is a name enclosed in square brackets.
Within each section a series of values are defined. Each line consists of a name to which the value is assigned, an equal sign, and the value to be assigned.
This section identifies the normal locations of various print spooling programs. The programs whose normal locations are identified are ``lp'', ``lpstat'', ``cancel'', ``lpr'', ``lpq'', and ``lprm''. Probably, the locations where the operating system installer puts these programs should be considered the normal locations. These normal locations are called ``well known'' because they tend to be the same on all systems and some applications expect to find them there. A typical [well known] section will look like this:
[well known] lp = /usr/bin/lp lpstat = /usr/bin/lpstat cancel = /usr/bin/cancel lpr = /usr/bin/lpr lpq = /usr/bin/lpq lprm = /usr/bin/lprm
You may choose to replace the standard print spooling programs, at their well known locations, with symbolic links to the Uprint substitutes. If you do this, then you must preserve the standard programs, either by renaming them or moving them to another directory. If you do this, you must tell Uprint where they are and what they are called. The [sidelined] section gives this information. (Note that the presence of a [sidelined] section does not indicate that the programs have been moved or renamed, it mearly indicates where they are and what they are called if they have been.)
A typical [sidelined] section looks like this:
[sidelined] lp = /usr/bin/real-lp lpstat = /usr/bin/real-lpstat cancel = /usr/bin/real-cancel lpr = /usr/bin/real-lpr lpq = /usr/bin/real-lpq lprm = /usr/bin/real-lprm
This section gives information which Uprint should use when submitting a job to the real System V LP spooler.
Currently there is only one setting defined. It is called ``sidelined=''. It should be set to ``yes'' or ``no''. If it is set to ``no'' then Uprint will expect to find ``lp'', ``lpstat'', and ``cancel'' at the locations specified in the [well known] section. If it is ``yes'' then Uprint will expect to find them at the locations specified in the [sidelined] section.
This section gives information which Uprint should use when submitting jobs to a BSD LPR derived spooler.
Currently there is only one setting defined. It is called ``sidelined=''. It should be set to ``yes'' or ``no''. If it is set to ``no'' then Uprint will expect to find ``lpr'', ``lpq'', and ``lprm'' at the locations specified in the [well known] section. If it is ``yes'' then Uprint will expect to find them at the locations specified in the [sidelined] section.
This section allows you to set system wide default destination queues for the Uprint programs.
Traditionally there is a default queue for the commands lp, and lpr. The requested operation will be performed on the default queue if you do not specify another queue by using command line options or environment variables. The default queue for Berkely lpr has generally been ``lp'' and is not changable. For lp the default queue is generally a system wide setting.
The setting ``uprint-lpr='' in this section will set the default destination for uprint-lpr, uprint-lpq, and uprint-lprm. If this setting is missing then a value of ``lp'' is assumed.
The setting ``uprint-lp='' in this section will set the default destination for uprint-lp. You will probably want to make this the same as ``uprint-lpr=''. This option does for uprint-lp what lpadmin -d does for the lp that comes with System V Unix and its derivatives.
If you set ``sidelined=yes'' in either the [to lp] or [to lpr] section then the standard spooler programs must be moved or renamed and symbolic links made to the Uprint versions. The program uprint-newconf will do this for you.
Simply set ``sidelined=yes'' in the [to lp] section or the [to lpr] section or both and run uprint-newconf. For each program that is to be ``sidelined'' it will move it from the location and name specified in the [well known] section to the location and name specified in the [sidelined] section. It will then put a symbolic link at the well known location, a link pointing to the Uprint substutite program.
If you later set ``sidelined=no'' and run uprint-newconf again the process will be reversed.
It does not hurt to run uprint-newconf more often than necessary. Each time you run it it will syncronize the file system with uprint.conf. However, a few cautions are in order. The first is that you should never change anything in the [sidelined] section while the standard spooler programs are sidelined. You should first change both ``sidelined='' lines to ``no'' and run uprint-newconf. If you fail to do this, uprint-newconf won't know where to find the programs and you will have to rename or move them yourself. The second warning is that you should ``unsideline'' the spoolers before doing an operating system upgrade. If you forget to do this, the upgrade program will probably replace the symbolic links to the Uprint programs with new versions of the standard programs. This is not disastrous, but it does mean that you will have to figure out what it did and move the latest versions of the standard spooler programs to the ``sidelined'' locations.
If uprint-newconf is invoked with the --remove option, it will remove the symbolic links to the UPRINT programs and will restore the BSD and System V spooler programs to their original locations. It will do this without regard to the ``sidelined='' settings in uprint.conf.
If uprint-newconf finds a /etc/alternatives directory, it will refuse do do anything unless the --remove or --force option is used. The /etc/alternatives directory is part of an operating system facility that performs the same function as uprint-newconf
The Uprint programs are a work in progress. They do not fully and correctly obey all options.
The Uprint versions of cancel just executes the System V spooler's version.
The Uprint lpstat is still rather limited.
The Uprint library is used by the programs described in the uprint-lp.1 manpage, the uprint-lpstat.1 manpage, the uprint-cancel.1 manpage, the uprint-lpr.1 manpage, the uprint-lpq.1 manpage, the uprint-lprm.1 manpage, and the lprsrv.8 manpage.
The Uprint programs use or replace the programs descibed in lp(1), lpstat(1), cancel(1), lpr(1), lpq(1), and lprm(1).
The Uprint system appeared in PPR version 1.31 in 1997.
David Chappell, Trinity College Computing Center, Hartford, Connecticut.