If your web browser formats this page incorrectly, try viewing the
page source. In netscape 4, click the view menu, then click page source.
The normal way to print in linux is to pipe the data to lpr. lpr
communicates with lpd. lpd should have been started
from the startup scripts and should be running
in the background. lpr/lpd decides what printer to use by checking the lpr
command line options, by checking environment parameter PRINTER, or
by using the first printer listed in /etc/printcap. lpr/lpd decide whether
or not the user is allowed to use the printer. lpr/lpd pipes the
data through the filter, which is probably called magic filter
or mf. The filter examines the data and determines the data format and
decides what conversions to perform. The filter converts the data by
piping the data through other filters. Usually the data is in postscript
format. If the data is not in postscript format, but is in a
recognizable format, the filter will probably convert the data to
postscript format. Once the data is in postscript format, the filter
uses a printer driver/filter like ghostscript to convert the data
to printer format. If the filter does not recognize the data format,
then the filter probably does not convert or change the data at
all. lpr/lpd stores the printer data in a temporary file
in the print spool directory /var/spool/lpd/something. lpr/lpd sends the
printer data to the printer port.
When you install a linux distribution, it
should install lpr/lpd and put the command to run lpd in the startup
scripts; it should install standard print filters like ghostscript; and it
should install and configure the drivers for the ports which connect
to the printer.
Assuming lpd, ghostscipt, and the port drivers are ok,
to install a printer you need to add the printer data to the lpr/lpd
configuration file /etc/printcap and create the spool directory. lpr/lpd
needs to know what port device to use to send data to the
printer, and which printer format to convert the data to. This information
may be stored in /etc/printcap, or it might be
stored somewhere else, where it can be accessed
by the filter. Try using the printer configuration utility included with
your linux distribution.
If the computer is only used by you and you never print more
than one thing at a time, then you do not need
to worry about which users are allowed to use the printer, and you
do not need to wait for the previous print job to finish before
starting the next print job. Instead of using lpr/lpd, you could
create a print script which does something like 'gs -sDEVICE=cdj500
-sOutputFile=/dev/lp0 $1'. The script could prompt for what
file conversions to perform. From a program, save to a postscript file
instead of printing, then use the print script to print the file.
This might be easier than setting up lpr/lpd. However,
most linux distributions automatically set up lpr/lpd, so it is probably
easier to use lpr/lpd.