Summary
lpr-bash is a replacement for other printing systems like
lpr(ng), cups and others implemented as single bash script.
Originally designed to run on a Linux from Scratch, later ported to Gentoo Linux, it should work with virtually any flavour of Linux or Unix, maybe even MacOS X (though this is untested).
Originally designed to run on a Linux from Scratch, later ported to Gentoo Linux, it should work with virtually any flavour of Linux or Unix, maybe even MacOS X (though this is untested).
Reasons
The most common Linux Printing Systems consists of a daemon
that needs to run in the background, in most cases listening on a port (ipp://, TCP port 631) for data, in the case of CUPS even as a webserver.
The advantage of this overdone functionality is that you can print from another PC in the network using the IPP protocol, while lpr-bash needs to resort to the print server functionality of samba for network printing.
If you only want local printing or have samba already started, lpr-bash is the smaller, less complex Printing System for you.
The advantage of this overdone functionality is that you can print from another PC in the network using the IPP protocol, while lpr-bash needs to resort to the print server functionality of samba for network printing.
If you only want local printing or have samba already started, lpr-bash is the smaller, less complex Printing System for you.
License
This script is GPL'd:
GNU General public
License.
Technology
lpr-bash is working the print data in the following
order:
Printers are read from the printcap file. For optimal compatibility, lpr-bash supports a subset of the standard printcap format:
Remarks are signed by a preceding dash ("#") at the beginning of the line, Printers are configured each by 3 lines:
Input File [ -> Postscript ] [ -> Printer Raster Data ] -> Printer input-* ps-* out-*After recieving the Input File, lpr-bash spawns another process for postscript conversion (to and from) and printing the output data. The square braced functions are optional: conversion to Postscript is only performed if the file is not already in Postscript format, while the conversion to Printer Raster Data is only necessary for Printers without Postscript support.
Printers are read from the printcap file. For optimal compatibility, lpr-bash supports a subset of the standard printcap format:
Remarks are signed by a preceding dash ("#") at the beginning of the line, Printers are configured each by 3 lines:
name|alternative name :rw:[lp|file|smb]=device :of=ghostscript optionsAll configuration data is read from /etc/lpr.conf - the origin and name of this neccessary config file can be only changed within the script itself.

