yanolc(1) - Linux man page
Name
yanolc - Yet ANOther Lprng/lpr Client
Synopsis
klpr [<options>] [<file(s)>] klpq [<options>] [<job(s)>] klprm [<options> [<job(s)>] klpc [<klpc-arguments>] klpinfo [<options>] snmpyalc [<options>]
Description
The yanolc package provides clones for the lpr, lpq, lprm and lpc programs found in LPRng and other print systems. Additionally there are two programs to retrieve printer status information using SNMP .
This package is intended for use on systems without the complete set of lpr/lpq/lprm/lpc, i.e. Windows.
KLPR/KLPQ/KLPRM OPTIONS
-P printer
- specifies the printer to use (klpr, klpq, klprm, klpinfo, snmpyalc).
Long option: --printer=printer
- -H server
- specifies the print server to contact (klpr, klpq, klprm, klpinfo, snmpyalc)).
Alternative option: -S server
Long option: --server=server
- -U user
- specifies a user name for the operation (klpr, klprm).
Long option: --username=user
- -C class
- specifies the print job class (klpr). I have never used this.
Long option: --class=class
- -C community
- specifies the SNMP community (klpinfo, snmpyalc).
Long option: --community=community
- File type (klpr)
- The print server can run conversion filters automatically to convert input to printable output.
For security reasons sites may decide to disable automatic filtering and require users to produce printable output theirselves. I strongly recommend to do so.
I suggest to send only literally/binary files which do not require any filtering by the print system.
For most of the file types I have no idea about the meaning. The lpr program simply passes this information to the server. For completeness I list the file types here:
- -l
Binary (literally) file, print as is without any filtering.
- Long option: --literally
- -c
Cifplot output file.
- Long option: --cifplot
- -d
DVI file from TeX/LaTeX.
- Long option: --dvi
- -g
Plot file.
- Long option: --plot
- -n
Device independent troff file.
- Long option: --dvi-troff
- -t
Troff file.
- Long option: --troff
- -r
Raster file.
- Long option: --raster
- -l
- -e
Enable header printing (klpr). This option is disabled by default.
- Long option: --header=boolean
- -j width
- Long option: --header=boolean
- specifies the indent width in columns (klpr).
Long option: --indent=width
- -J name
- specifiest the job name for printing (klpr).
Long option: --jobname=name
- -K number
- specifies the number of copies (klpr).
Alternative option: -# copies
Long option: --copies=copies
- -m address
- specifies a mail address for notifications (klpr).
Long option: --mail=address
- -T title
- specifies the job title (klpr).
Long option: --jobtitle=title
- -T snmp-type
- chooses the SNMP type name as specified in the snmpyalc.cfg file (snmpyalc).
- -w width
- specifies the output width for text in columns (klpr).
Long option: --width=width
- -o options
- passes the options to the filters (klpr).
- -V
sets verbose mode (klpr).
- Long option: --verbose=boolean
- -V protocol
- Long option: --verbose=boolean
- specifies the SNMP protocol version (klpinfo, snmpyalc), can be ''1'', ''2'', ''2c'', ''2p'' or ''3''.
Long option: --version=protocol
- -Q queue
- is not implemented here. On LPRng systems this option can be used to name the original queue (klpr).
Long option: --original-queue=queue
- -R user
- is not implemented here. On LPRng systems this option can be used to specify the user who is charged for the print job (klpr).
Long option: --bill=user
- -a
shows information about all queues (klpq) or removes all accessable print jobs (klprm).
- Long option: --all
- -s
generates a short status message only (klpq).
- Long option: --status
- -s
runs silently (klpinfo, snmpyalc).
- Long option: --silently
- -l
sets long output format (klpq, klpinfo).
- Long option: --long-output
- -L
sets very long output format (klpq).
- Long option: --very-long-output
- -f
removes filter status lines (klpq).
- Long option: --remove-filter-status
- -f
forces output (klpinfo, snmpyalc). If no status can be obtained klpinfo print ''-''.
- Long option: --force
- -d
removes ''done'' jobs from output list (klpq).
- -t seconds
- Long option: --all
- runs periodically (klpq).
Long option: --repeat=seconds
- -i
ignores the exit code and enforces exit status 0 (klpinfo, snmpyalc).
- Long option: --ignore-exit-code
Klpc Command Line Arguments
-H server
- chooses the server to connect to.
- klpc start queue
- starts a print queue.
- klpc stop queue
- stops a print queue.
- klpc enable queue
- enables spooling to a queue.
- klpc disable queue
- disables spooling to a queue.
- klpc abort queue
- aborts (kills) the current active job in the queue.
- klpc kill queue
- restarts a queue.
- klpc topq queue job
- moves the job to the top of queue (next job printed).
- klpc status queue
- displays daemon and queue status.
- klpc hold queue job(s)
- holds the specified jobs (keeps them in the queue but does not print them).
- klpc holdall queue
- holds all jobs in the queue.
- klpc release printer job(s)
- releases the jobs (allow processing).
- klpc move job(s) queue
- moves the jobs to another queue.
- klpc active queue
- checks a print queue response.
- klpc lpd queue
- prints the PID of the LPRng/LPD process managing the queue.
Return Value
The programs return exit status code 0 on success, any other value indicates an error.
Environment And Preferences
Default printer
- If no queue is specified on the command line the default printer information is searched in the following places:
- /yanolc/default-printer
- command line preference.
- NGPRINTER
- environment variable.
- NPRINTER
- environment variable.
- LPDEST
- environment variable.
- PRINTER
- environment variable.
- /yanolc/default-printer
- user-specific preference.
- /default-printer
- entry in the HKCU\Software\DKrause\Yanolc registry key.
- /yanolc/default-printer
- system preference.
- default-printer
- entry in the HKLM\Software\DKrause\Yanolc registry key.
- first alias
- found in the configuration file.
- first queue
- found in the configuration file.
Default host
- If the print queue name contains ''@'' or ''%'' the host name is obtained from the print queue. If it doesn't yanolc attempts to resolve the queue name as
an alias.
If no print host name was found, information is searched in the following places:
- PRINTHOST
- environment variable.
- /yanolc/print-host
- user preference.
- /print-host
- entry in the HKCU\Software\DKrause\Yanolc registry key.
- /yanolc/print-host
- system preference.
- /print-host
- entry in the HKLM\Software\DKrause\Yanolc registry key.
- first host
- listed in the configuration file.
Files
There are two configuration files, yanolc.cfg (used by all program from the yanolc package) and snmpyalc.cfg (used by snmpyalc only). The files are found in ${sysconfdir}/yanolc (i.e. /etc/yanolc or /usr/local/etc/yanolc) on UNIX/Linux or in %WINDIR%\Yanolc on Windows.
yanolc.cfg
- The yanolc.cfg file consists of a ''[hosts]'', ''[devices]'' and ''[aliases]'' section.
The hosts section consists of a list of hosts descriptions.
Each host description is introduced by the host name standing alone of a line.
The remaining lines in a host description are key/value pairs, key and value are separated by ''=''.
The following key can be used:
- type
print system type, one from ''lprng'' (LPRng print server), ''bsd'' ( BSD print server) or ''raw'' (direct TCP/IP connection).
- xusers
- type
- lists usernames which are allowed to use the ''-U'' option to switch to another user name. The names are separated by spaces.
- timeout.lpr
- specifies the timeout in seconds for lpr requests.
- timeout.lpq
- specifes the timeout in seconds for lpq requests.
- timeout.lpc
- specifies the timeout in seconds for lpc requests.
- timeout.lprm
- specifies the timeout in seconds for lprm requests.
- The devices section consists of a list of device descriptions.
Each device description is introduced by a queue name (queue@host) standing alone on a line.
The remaining lines are key/value pairs, key and value are separated by ''=''. The keys are the same as in the hosts section.
The aliases section contains key/value pairs, key and value are separated by ''=''. The key is a short name (i.e. ''pr1''), the value is a full print queue name (queue@host) which should be configured in the devices section.
snmpyalc.cfg
- The snmpyalc.cfg file lists SNMP device types, each type is specified in one section. The section is started by the type name in square
brackets. The section lists the OIDs to inspect ( OID must start in column 0) and applies attributes (written indented).
The following attributes can be used:
- type =type
- specifies the data type stored in the OID , either ''display'' ( OID is of type ASN_OCTET_STRING , the value can be displayed directly), ''boolean'' (the OIDs type is ASN_INTEGER , ASN_COUNTER , ASN_GAUGE or ASN_TIMETICKS , the boolean value is true if the OID value is not 0) or ''iboolean'' ( OID type is ASN_INTEGER , ASN_COUNTER , ASN_GAUGE or ASN_TIMETICKS , the boolean value is if the OID value is 0).
- text=text
- specifies the text to be shown instead of the OIDs value. This allows to convert boolean or iboolean OIDs values to text readable by the user.
See Also
http://dktools.sourceforge.net/yanolc.html
Author
Dirk Krause
Copyright And License
Copyright © 2010, Dirk Krause All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Dirk Krause nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE .
Pod Errors
Hey! The above document had some coding errors, which are explained below:
- Around line 269:
- '=item' outside of any '=over'
- Around line 334:
- You forgot a '=back' before '=head1'