home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 8 / CDACTUAL8.iso / docs / printing < prev    next >
Encoding:
Text File  |  1996-07-11  |  26.3 KB  |  644 lines

  1.   The Linux Printing HOWTO
  2.   Grant Taylor, <gtaylor@picante.com>
  3.   v3.6, 12 March 1996
  4.  
  5.   This is the Linux Printing HOWTO, a collection of information on how
  6.   to generate, preview, print and fax anything under Linux (and other
  7.   Unices in general).
  8.  
  9.   1.  Intro
  10.  
  11.   Since this is a complete rewrite, much information from previous
  12.   editions has been lost.  This is by design, as the previous HOWTOs
  13.   were so large as to be 60 typeset pages, and had the narrative flow of
  14.   a dead turtle.  If you do not find the answer here, you are encouraged
  15.   to a) scan the previous version at The PHT Home Page
  16.   <http://www.picante.com/~gtaylor/pht/> and b) drop me a note saying
  17.   what ought to be here but isn't.
  18.  
  19.   The Printing HOWTO Home Page <http://www.picante.com/~gtaylor/pht/> is
  20.   a good place to find the latest version; it is also, of course,
  21.   distributed from SunSite (sunsite.unc.edu) and your friendly local LDP
  22.   mirror.
  23.  
  24.   1.1.  History
  25.  
  26.   This is the third generation, which is to say the third complete
  27.   rewrite, of the Printing HOWTO.  The history of the PHT may be
  28.   chronicled thusly:
  29.  
  30.   1. I wrote the printing-howto in response to too many printing
  31.      questions in comp.os.linux, and posted it.  This predated the HOWTO
  32.      project by a few months and was thus the first FAQlet called a
  33.      `howto'.  This edition was in plain ascii.
  34.  
  35.   2. After joining the HOWTO project, the Printing-HOWTO was merged with
  36.      an Lpd FAQ by Brian McCauley <B.A.McCauley@bham.ac.uk>; we
  37.      continued to co-author the PHT for two years or so.  At some point
  38.      we incorporated the work of Karl Auer <Karl.Auer@anu.edu.au>.  This
  39.      generation of the PHT was in TeXinfo, and available in PS, HTML,
  40.      Ascii, and Info.
  41.  
  42.   3. After letting the PHT rot and decay for over a year, and an
  43.      unsuccessful attempt at getting someone else to maintain it, this
  44.      rewrite happened.  This generation of the PHT is in Linuxdoc-SGML.
  45.  
  46.   1.2.  Copyright
  47.  
  48.   This document is Copyright (c) 1996 by Grant Taylor.  Please copy and
  49.   distribute it widely, but do not modify the text or omit my name.
  50.  
  51.   2.  How to print
  52.  
  53.   If you've already got lpd setup to print to your printer, or your
  54.   system administrator already did so, or your vendor did so for you,
  55.   then all you need to do is learn how to use the lpr command.  The
  56.   Printing Usage HOWTO <http://sunsite.unc.edu/mdw/HOWTO/Printing-Usage-
  57.   HOWTO.html> covers this, and a few other queue manipulation commands
  58.   you should probably know.
  59.  
  60.   3.  Kernel printer devices
  61.  
  62.   3.1.  The lp device
  63.  
  64.   The Linux kernel, assuming you have compiled in or loaded the lp
  65.   device (the output of cat /proc/devices should include the device lp),
  66.   provides one or more of /dev/lp0, /dev/lp1, and /dev/lp2.  These are
  67.   NOT assigned dynamically, rather, each corresponds to a specific
  68.   hardware I/O address.  This means that your first printer may be lp0
  69.   or lp1 depending on your hardware.  Try both ;)
  70.  
  71.   One cannot run the plip and lp drivers at the same time.  (Is this
  72.   true port-by-port, or globally on a machine?  I think globally, but I
  73.   haven't tried.)
  74.  
  75.   There is a little utility called tunelp floating about with which you,
  76.   as root, can tune the Linux lp device's interrupt usage, polling rate,
  77.   and other options.
  78.  
  79.   When loaded as a module in late-model 1.3.x kernels only, is is
  80.   possible to specify io addresses and interrupt lines on the insmod
  81.   command line using the usual syntax.  The parameters are io=x,y,z and
  82.   irq=x,y,z, where x, y and z are exactly what you would assume.  Read
  83.   ye the man page for insmod for more information on this.
  84.  
  85.   3.2.  Serial devices
  86.  
  87.   Serial devices are usually called something like /dev/ttyS1 under
  88.   Linux.  The utility stty will allow you to interactively view or set
  89.   the settings for a serial port; setserial will allow you to control a
  90.   few extended attributes and configure IRQs and I/O addresses for non-
  91.   standard ports.  Further discussion of serial ports under Linux may be
  92.   found in the Serial-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/Serial-
  93.   HOWTO.html>.
  94.  
  95.   4.  How it works, basic
  96.  
  97.   In order to get printing working well, you need to understand how the
  98.   lpd system works.
  99.  
  100.   Lpd stands for Line Printer Daemon, and refers in different contexts
  101.   to both the daemon and the whole collection of programs which run
  102.   print spooling.  These are:
  103.  
  104.      lpd
  105.         The spooling daemon.  One of these runs to control everything on
  106.         a machine, AND one is run per printer while the printer is
  107.         printing.
  108.  
  109.      lpr
  110.         The user spooling command.  Lpr contacts lpd and injects a new
  111.         print job into the spool.
  112.  
  113.      lpq
  114.         Lists the jobs in a print queue.
  115.  
  116.      lpc
  117.         The Lpd system control command.  With lpc you can stop, start,
  118.         reorder, etc, the print queues.
  119.  
  120.      lprm
  121.         lprm will remove a job from the print spool.
  122.  
  123.   So how does it fit together?  Well, when the computer boots, lpd is
  124.   run.  It scans the file /etc/printcap to learn which printers it will
  125.   be managing spools for.  Each time someone runs lpr, lpr contacts lpd
  126.   through the named socket /dev/printer, and feeds lpd both the file to
  127.   print and some information about who is printing and how to print it.
  128.   Lpd then prints the file on the appropriate printer in turn.
  129.  
  130.   The lp system was originally designed when most printers were line
  131.   printers - that is, people mostly printer plain ascii.  As it turns
  132.   out, only a little extra scripting is needed to make lpd work quite
  133.   well for today's print jobs, which are often in PostScript, or text,
  134.   or dvi, or...
  135.  
  136.   5.  How to set things up, basic
  137.  
  138.   5.1.  Traditional lpd configuration
  139.  
  140.   The minimal setup for lpd rsults in a system that can queue files and
  141.   print them.  It will not pay any attention to wether or not your
  142.   printer will understand them, and will probably not let you produce
  143.   attractive output.  Nevertheless, it is the first step to
  144.   understanding, so read on!
  145.  
  146.   Basically, to add a print queue to lpd, you must add an entry in
  147.   /etc/printcap, and make the new spool directory under /var/spool/lpd.
  148.  
  149.   An entry in /etc/printcap looks like:
  150.  
  151.        # LOCAL djet500
  152.        lp|dj|deskjet:\
  153.                :sd=/var/spool/lpd/dj:\
  154.                :mx#0:\
  155.                :lp=/dev/lp0:\
  156.                :sh:
  157.  
  158.   This defines a spool called lp, dj, or deskjet, spooled in the direc¡
  159.   tory /var/spool/lpd/dj, with no per-job maximum size limit, which
  160.   prints to the device /dev/lp0, and which does not have a banner page
  161.   (with the name of the person who printed, etc) added to the front of
  162.   the print job.
  163.  
  164.   Go now and read the man page for printcap.
  165.  
  166.   The above looks very simple, but there a hitch - unless I send in
  167.   files a DeskJet 500 can understand, this DeskJet will print strange
  168.   things.  For example, sending an ordinary Unix text file to a deskjet
  169.   results in literally interpreted newlines, and gets me:
  170.  
  171.        This is line one.
  172.                         This is line two.
  173.                                          This is line three.
  174.  
  175.   ad nauseum.  Printing a PostScript file to this spool would get a beu¡
  176.   tiful listing of the PostScript commands, printed out with this
  177.   "staircase effect", but no useful output.
  178.  
  179.   Clearly more is needed, and this is the purpose of filtering.  The
  180.   more observant of you who read the printcap man page might have
  181.   noticed the spool attributes if and of.  Well, if, or the input
  182.   filter, is just what we need here.
  183.  
  184.   If we write a small shell script called filter that adds carriage
  185.   returns before newlines, the staircasing can be eliminated.  So we
  186.   have to add in an if line to our printcap entry above:
  187.  
  188.        lp|dj|deskjet:\
  189.                :sd=/var/spool/lpd/dj:\
  190.                :mx#0:\
  191.                :lp=/dev/lp0:\
  192.                :if=/var/spool/lpd/dj/filter:\
  193.                :sh:
  194.  
  195.   A simple filter script might be:
  196.  
  197.        #!perl
  198.        while(<STDIN>){printf "$_\r";};
  199.  
  200.   If we were to do the above, we'd have a spool to which we could print
  201.   regular Unix text files and get meaningful results.  (Yes, there are
  202.   four million better ways to write this filter, but few so illustra¡
  203.   tive.  You are encouraged to do this more efficiently.)
  204.  
  205.   The only remaining problem is that printing plain text is really not
  206.   to hot - surely it would be better to be able to print PostScript and
  207.   other formatted or graphic types of output.  Well, yes, it would, and
  208.   it's easy to do.  The method is simply an extention of the above
  209.   linefeed-fixing filter.  If you write a filter than can accept
  210.   arbitrary file types as input and produce DeskJet-kosher output for
  211.   each case, then you've got a clever print spooler indeed!
  212.  
  213.   Such a filter is called a magic filter.  Don't bother writing one
  214.   yourself unless you print strange things - there are a good many
  215.   written for you already on the net.
  216.  
  217.   5.2.  File Permissions
  218.  
  219.   By popular demand, I include below a listing of the permissions on
  220.   interesting files on my system.  There are a number of better ways to
  221.   do this, ideally using only SGID binaries and not making everything
  222.   SUID root, but this is how my system came out of the box, and it works
  223.   for me.  (Quite frankly, if your vendor can't even ship a working lpd
  224.   you're in for a rough ride).
  225.  
  226.        -r-sr-sr-x   1 root     lp    /usr/bin/lpr*
  227.        -r-sr-sr-x   1 root     lp    /usr/bin/lprm*
  228.        -rwxr--r--   1 root     root  /usr/sbin/lpd*
  229.        -r-xr-sr-x   1 root     lp    /usr/sbin/lpc*
  230.        drwxrwxr-x   4 root     lp    /var/spool/lpd/
  231.        drwxr-xr-x   2 root     lp    /var/spool/lpd/lp/
  232.  
  233.   Lpd must currently be run as root so that it can bind to the low-
  234.   numbered lp service port.  It should probably become UID lp.lp or
  235.   something after binding, but I don't think it does.  Bummer.
  236.  
  237.   6.  How to obtain an appropriate magic filter
  238.  
  239.   6.1.  APS Filter
  240.  
  241.   One of the nicest magic filter packages is aps filter, by Andreas
  242.   Klemm.  The Linux Software Map entry goes something like this:
  243.  
  244.        Begin3
  245.        Title:          apsfilter
  246.        Version:        4.9.1
  247.        Entered-date:   Montag, 10. Juli 1995, 21:22:35 Uhr MET DST
  248.        Description:    magicfilter for lpd with auto filetype detection
  249.        Keywords:       lpd magicfilter aps apsfilter
  250.        Author:         andreas@knobel.GUN.de (Andreas Klemm)
  251.        Maintained-by:  sledge@hammer.oche.de (Thomas Bueschgens)
  252.                        andreas@knobel.GUN.de (Andreas Klemm)
  253.        Primary-site:   sunsite.unc.edu
  254.                        /pub/Linux/system/Printing/
  255.                        211KB aps-491.tgz
  256.        Original-site:  ftp-i2.informatik.rwth-aachen.de
  257.                        /pub/Linux/pak/APSfilter/aps-491.tgz
  258.        Platforms:      C-Compiler, gs Postscript emulator, pbmutils
  259.        Copying-policy: GPL
  260.        End
  261.  
  262.   APS filter installs as an if filter for a print queue, and will trans¡
  263.   late from many common file types into your printer's command set.  It
  264.   understands, for example, text, PostScript, dvi, gif, and others.
  265.  
  266.   6.2.  Magic-filter
  267.  
  268.   The magic-filter package, written by B.A.McCawley, works much the same
  269.   way as does APSfilter, but since it is written in bash, it might be
  270.   more easy to customize.  The LSM entry:
  271.  
  272.        Version: 0.4
  273.        Description: Bash scripts to simplify the task of configuring lpd to
  274.           auto-detect file types using /etc/magic. (As advertised in the
  275.           printing-HOWTO).
  276.           This package uses existing filters so it only prints file types for
  277.           which one already has filters (or compressed versions
  278.           thereof). Alterative magic filter approches are described in the
  279.           printing-HOWTO.
  280.        Keywords: lpd, /etc/magic, printing, filter
  281.        Author: B.A.McCauley@bham.ac.uk (Brian McCauley)
  282.        Maintained-by: B.A.McCauley@bham.ac.uk
  283.        Primary-site: tsx-11.mit.edu pub/linux/sources/usr.bin
  284.                      magic-filter-0.4.tar.gz  5709
  285.        Copying-policy: GNU GPL
  286.  
  287.   7.  Serial printers under lpd
  288.  
  289.   7.1.  Setting up in printcap
  290.  
  291.   Lpd provides five attributes which you can set in /etc/printcap to
  292.   control all the settings of the serial port a printer is on.  Read the
  293.   printcap man page and note the meanings of br#, fc#, xc#, fs# and xs#.
  294.   The last four of these attributes are bitmaps indicating the settings
  295.   for use the port.  The br# atrribute is simply the baud rate, ie
  296.   `br#9600'.
  297.  
  298.   It is very easy to translate from stty settings to printcap flag
  299.   settings. If you need to, see the man page for stty now.
  300.  
  301.   Use stty to set up the printer port so that you can cat a file to it
  302.   and have it print correctly. Here's what `stty -a' looks like for my
  303.   printer port:
  304.  
  305.        dina:/usr/users/andy/work/lpd/lpd# stty -a < /dev/ttyS2
  306.        speed 9600 baud; rows 0; columns 0; line = 0;
  307.        intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
  308.        eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
  309.        lnext = ^V; min = 1; time = 0;
  310.        -parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
  311.        -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr
  312.        -igncr -icrnl ixon -ixoff -iuclc -ixany -imaxbel
  313.        -opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0
  314.        bs0 vt0 ff0
  315.        -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase
  316.        -tostop -echoprt -echoctl -echoke
  317.  
  318.   The only changes between this and the way the port is initialized at
  319.   bootup are -clocal, -crtscts, and ixon. Your port may well be differ¡
  320.   ent depending on how your printer does flow control.
  321.  
  322.   Once you have your stty settings right, so that `cat file >
  323.   /dev/ttyS2' (in my case) sends the file to the printer, look at the
  324.   file /usr/src/linux/include/linux/termios.h. This contains a lot of
  325.   #defines and a few structs (You may wish to cat this file to the
  326.   printer (you do have that working, right?) and use it as scratch
  327.   paper).  Go to the section that starts out
  328.  
  329.        /* c_cflag bit meaning */
  330.        #define CBAUD   0000017
  331.  
  332.   This section lists the meaning of the fc# and fs# bits. You will
  333.   notice that the names there (after the baud rates) match up with one
  334.   of the lines of stty output. Didn't I say this was going to be easy?
  335.  
  336.   Note which of those settings are preceded with a - in your stty
  337.   output. Sum up all those numbers (they are octal). This represents the
  338.   bits you want to clear, so the result is your fc# capability.  Of
  339.   course, remember that you will be setting bits directly after you
  340.   clear, so you can just use `fc#0177777' (I do).
  341.  
  342.   Now do the same for those settings (listed in this section) which do
  343.   not have a - before them in your stty output. In my example the
  344.   important ones are CS8 (0000060), HUPCL (0002000), and CREAD
  345.   (0000200). Also note the flags for your baud rate (mine is 0000015).
  346.   Add those all up, and in my example you get 0002275. This goes in your
  347.   fs# capability (`fs#02275' works fine in my example).
  348.  
  349.   Do the same with set and clear for the next section of the include
  350.   file, "c_lflag bits". In my case I didn't have to set anything, so I
  351.   just use `xc#0157777' and `xs#0'.
  352.  
  353.   7.2.  Older serial printers that drop characters
  354.  
  355.   Jon Luckey points out that some older serial printers with ten-cent
  356.   serial interfaces and small buffers really mean stop when they say so
  357.   with flow control.  He found that disabling the FIFO in his Linux
  358.   box's 16550 serial port with setserial corrected the problem of
  359.   dropped characters.
  360.  
  361.   8.  Vendor Solutions
  362.  
  363.   This section is, by definition, incomplete.  Feel free to send in
  364.   details of your favourite distribution.
  365.  
  366.   8.1.  RedHat 2.x
  367.  
  368.   RedHat has a GUI printer administration tool which can add remote
  369.   printers and printers on local devices.  It lets you choose a
  370.   ghostscript-supported printer type and Unix device file to print to,
  371.   then installs a print queue in /etc/printcap and writes a short
  372.   PostScript-and-ascii magic filter based around gs and nenscript.  This
  373.   solution works fairly well, and is trivial to setup for common cases.
  374.  
  375.   8.2.  Other Distributions
  376.  
  377.   Please send me info on what other distributions do.
  378.  
  379.   9.  How to print to a printer over the network
  380.  
  381.   One of the features of lpd is that it supports printing over the
  382.   network to printers physically connected to a different machine.
  383.  
  384.   9.1.  To a Unix/lpd host
  385.  
  386.   To allow remote machines to print to your printer, you must list the
  387.   machines in /etc/hosts.equiv or /etc/hosts.lpd.  (Note that
  388.   hosts.equiv has a host of other effects; be sure you know what you are
  389.   doing if you list any machine there).  You can allow only certain
  390.   users on the other machines to print to your printer by usign the rs
  391.   attribute; read the lpd man page for information on this.
  392.  
  393.   To print to another machine, you make an /etc/printcap entry like
  394.   this:
  395.  
  396.   # REMOTE djet500
  397.   lp|dj|deskjet:\
  398.           :sd=/var/spool/lpd/dj:\
  399.           :rm=machine.out.there.com:\
  400.           :rp=printername:\
  401.           :lp=/dev/null:\
  402.           :sh:
  403.  
  404.   Note that there is still a spool directory on the local machine man¡
  405.   aged by lpd.  If the remote machine is busy or offline, print jobs
  406.   from the local machine wait in the spool area until they can be sent.
  407.  
  408.   9.2.  To a Win95, WinNT, LanManager, or Samba printer
  409.  
  410.   It is possible to direct an lpd queue through the smbclient program
  411.   (part of the samba suite) to a TCP/IP based SMB print service.  Samba
  412.   includes a script to do this called smbprint.  In short, you put a
  413.   configuration file for the specific printer in question in the spool
  414.   directory, and install the smbprint script as the if.
  415.  
  416.   The /etc/printcap entry goes like this:
  417.  
  418.        lp|remote-smbprinter:\
  419.            :lp=/dev/null:sh:\
  420.            :sd=/var/spool/lpd/lp:\
  421.            :if=/usr/local/sbin/smbprint:
  422.  
  423.   You should read the documentation inside the smbprint script for more
  424.   information on how to set this up.
  425.  
  426.   9.3.  To a NetWare Printer
  427.  
  428.   The ncpfs suite includes a utility called nprint which provides the
  429.   same functionality as smbprint but for NetWare.  You can get ncpfs
  430.   from  <ftp://linux01.gwdg.de/pub/ncpfs/>.  From the LSM entry for
  431.   version 0.16:
  432.  
  433.        With ncpfs you can mount volumes of your netware server
  434.        under Linux. You can also print to netware print queues and
  435.        spool netware print queues to the Linux printing system. You
  436.        need kernel 1.2.x or 1.3.54 and above. ncpfs does NOT work
  437.        with any 1.3.x kernel below 1.3.54.
  438.  
  439.   To make nprint work via lpd, you write a little shell script to print
  440.   stdin on the NetWare printer, and install that as the if for an lpd
  441.   print queue.  You'll get something like:
  442.  
  443.        sub2|remote-NWprinter:\
  444.                :lp=/dev/null:sh:\
  445.                :sd=/var/spool/lpd/sub2:\
  446.                :if=/var/spool/lpd/nprint-script:
  447.  
  448.   9.4.  To an EtherTalk (Apple) printer
  449.  
  450.   I would assume that the netatalk package includes something like
  451.   nprint and smbclient.  Someone let me know if this can be done!
  452.  
  453.   9.5.  To an HP or other ethernet printer
  454.  
  455.   HPs and some other printers come with an ethernet interface which you
  456.   can print directly to using lpd.  You should follow the instructions
  457.   that came with your printer or its network adaptor, but in general,
  458.   such printers are "running" lpd, and provide one or more queues which
  459.   you can print to.  An HP, for example, might work with a printcap
  460.   like:
  461.  
  462.        lj-5|remote-hplj:\
  463.                :lp=/dev/null:sh:\
  464.                :sd=/var/spool/lpd/lj-5:\
  465.                :rm=printer.name.com:rp=raw:
  466.  
  467.   In a large scale environment, especially a large environment where
  468.   some printers do not support PostScript, it may be useful to establish
  469.   a dedicated print server to which all machines print and on which all
  470.   ghostscript jobs are run.
  471.  
  472.   9.6.  Running an if for remote printers
  473.  
  474.   One oddity of lpd is that the if is not run for remote printers.  If
  475.   you find that you need to run an if, you can do so by setting up a
  476.   double queue and requeueing the job.  As an example, consider this
  477.   printcap:
  478.  
  479.        lj-5:remote-hplj:\
  480.                :lp=/dev/null:sh:\
  481.                :sd=/var/spool/lpd/lj-5:\
  482.                :if=/usr/lib/lpd/filter-lj-5:
  483.        lj-5-remote:lp=/dev/null:sh:rm=printer.name.com:\
  484.                :rp=raw:sd=/var/spool/lpd/lj-5-raw:
  485.  
  486.   in light of this filter-lj-5 script:
  487.  
  488.        #!/bin/sh
  489.        gs <options> -q -dSAFER -sOutputFile=- - | \
  490.                lpr -Plj-5-remote -U$5
  491.  
  492.   The -U option to lpr only works if lpr is run as daemon, and it sets
  493.   the submitter's name for the job in the resubmitted queue correctly.
  494.   You should probably use a more robust method of getting the username,
  495.   since in some cases it is not argument 5.  See the man page for
  496.   printcap
  497.  
  498.   10.  How to print to a fax machine.
  499.  
  500.   10.1.  Using a faxmodem
  501.  
  502.   There are a number of fax programs out there that will let you fax and
  503.   receive documents.  One of the most complex is Sam Leffler's HylaFax,
  504.   available from ftp.sgi.com.  It supports all sorts of things from
  505.   multiple modems to broadcasting.
  506.  
  507.   Also available, and a better choice for most Linux boxen, is efax, a
  508.   simple program which sends faxes.  The getty program mgetty can
  509.   receive faxes (and even do voicemail on some modems!).
  510.  
  511.   10.2.  Using the Remote Printing Service
  512.  
  513.   There is an experimental service offered that lets you send an email
  514.   message containing something you'd like printed such that it will
  515.   appear on a fax machine elsewhere.  Nice formats like postscript are
  516.   supported, so even though global coverage is spotty, this can still be
  517.   a very useful service.  For more information on printing via the
  518.   remote printing service, see the FAQ
  519.   <http://www.town.hall.org/fax/faq.html>.
  520.  
  521.   11.  How to generate something worth printing.
  522.  
  523.   Here we get into a real rat's-nest of software.  Basically, Linux can
  524.   run four types of binaries with varying degrees of success: Linux,
  525.   iBCS, Win16 (with dosemu and, someday, with Wine), and Mac/68k (with
  526.   Executor).  I'll just discuss native Linux and common Unix software,
  527.   except to say that WordPerfect for SCO, and quite probably other
  528.   commercial word processing software, runs fine under Linux's iBCS
  529.   emulation.
  530.  
  531.   For Linux itself, choices are mostly limited to those available for
  532.   Unix in general:
  533.  
  534.   11.1.  Markup languages
  535.  
  536.   Most markup languages are more suitable for large or repetative
  537.   projects, where you want the computer to control the layout of the
  538.   text to make things uniform.  Trying to make a pretty sign in a markup
  539.   language would probably hurt...
  540.  
  541.      nroff
  542.         This was one of the first Unix markup languages.  Man pages are
  543.         the most common examples of things formatted in *roff macros;
  544.         many people swear by them, but nroff has, to me at least, a more
  545.         arcane syntax than needed, and probably makes a poor choice for
  546.         new works.  It is worth knowing, though, that you can typeset a
  547.         man page directly into postscript with groff.  Most man commands
  548.         will do this for you with man -t foo | lpr.
  549.  
  550.      TeX
  551.         TeX, and the macro package LaTeX, are one of the most widely
  552.         used markup languages on Unix.  Technical works are frequently
  553.         written in LaTeX because it greatly simplifies the layout issues
  554.         and is still one of the few text processing systems to support
  555.         mathematics both completely and well.  TeX's output format is
  556.         dvi, and is converted to PostScript or Hewlett Packard's PCL
  557.         with dvips or dvilj.
  558.      SGML
  559.         There is at least one free sgml parser available for Unix and
  560.         Linux; it forms the basis of Linuxdoc-SGML's homegrown document
  561.         system.  It can support other DTD'S, as well.
  562.  
  563.      HTML
  564.         Someone suggested that for simple projects, it may suffice to
  565.         write it in HTML and print it out using Netscape.  I disagree,
  566.         but YMMV.
  567.  
  568.   11.2.  WYSIWYG
  569.  
  570.   There is a general shortage of WYSIWYG text processing software.  Feel
  571.   free to write some, and do let me know of anything I've omitted here.
  572.  
  573.      Lyrix
  574.         Lyrix is a front-end to LaTeX which looks very promising.
  575.  
  576.      The Andrew User Interface System
  577.         AUIS includes ez, a WYSIWYG-style editor with most basic word
  578.         processor features, HTML capabilities, and full MIME email and
  579.         newsgroup support.
  580.  
  581.   12.  Ghostscript.
  582.  
  583.   Ghostscript is an incredibly significant program for Linux printing.
  584.   Most printing software under Unix generates PostScript, which is
  585.   typically a $100-300 option on a printer.  Ghostscript, however, is
  586.   free, and will generate the language of your printer from PostScript.
  587.   When tied in with your lpd input filter, it gives you a virtual
  588.   PostScript printer and simplifies life immensely.
  589.  
  590.   Ghostscript is available in two forms.  The commercial version of
  591.   Ghostscript, called Aladdin Ghostscript, may be used freely for
  592.   personal use but may not be distributed by commercial Linux
  593.   distributions.  It is generally a year or so ahead of the free
  594.   Ghostscript; at the moment, for example, it supports Adobe Acrobat's
  595.   Portable Document Format, while the older Ghostscripts do not.
  596.  
  597.   The free version of Ghostscript is GNU Ghostscript, and is simply an
  598.   aged version of Aladdin ghostscript kindly given to GNU.  (Kudos to
  599.   Aladdin for this arrangement; more software vendors should support
  600.   free software in this way).
  601.  
  602.   Ghostscript's main failing is in its fonts, which are derived from
  603.   bitmap scans of the characters.  Superior, but commercially licensed
  604.   fonts may be obtained from several places, since Ghostscript can read
  605.   type 1 Adobe fonts.  Adobe distributes useable fonts with their
  606.   Acrobat PDF reader, or you may use the fonts from Adobe's ATM or a
  607.   fontpack.
  608.  
  609.   Whatever you do with gs, be very sure to run it with the option for
  610.   disabling file access (-dSAFER).  PostScript is a fully functional
  611.   language, and a bad PostScript program could give you quite a
  612.   headache.
  613.  
  614.   13.  On-screen previewing of printable things.
  615.  
  616.   Nearly anything you can print can be viewed on the screen, too.
  617.  
  618.   13.1.  PostScript
  619.  
  620.   Ghostscript has an X11 driver best used under the management of the
  621.   PostScript previewer Ghostview.  The latest versions of these programs
  622.   should be able to view PDF files, as well.
  623.  
  624.   13.2.  TeX dvi
  625.  
  626.   TeX DeVice Independant files may be previewed under X11 with xdvi.
  627.   Modern versions of xdvi call ghostscript to render PostScript
  628.   specials.
  629.  
  630.   A VT100 driver exists as well.  It's called dgvt.  Tmview works with
  631.   Linux and svgalib, if that's all you can do.
  632.  
  633.   14.  Credits
  634.  
  635.   The smbprint information is from an article by Marcel Roelofs
  636.   <marcel@paragon.nl>.
  637.  
  638.   The nprint information for using Netware printers was provided by
  639.   Michael Smith <mikes@bioch.ox.ac.uk>.
  640.  
  641.   The serial printers under lpd section is from Andrew Tefft
  642.   <teffta@engr.dnet.ge.com>.
  643.  
  644.