On Wed, 3 Nov 1999, John Curry wrote:
> Does anyone know how to set up two printers for a desktop?
Well I'll try and help on this one, but true understanding of unix
printing is, I suspect, an occult art.
> 'lisa' (using --printer, is this a true switch or an environment variable?)
> seems to set up one printer with two entries, 'ps' with a filter and 'lp'
There are a number of mechanisms at play here. Actual output to the
physical printer is managed by the printer daemon *lpd*, it performs
two main functions;
1. spooling print jobs to avoid device contention. each logical printing
device will have a directory under /var/spool/lpd where temporary
data files and control files are stored
2. applying limited page formatting to output; this is largely
controlled through the *printcap* file in /etc
lisa has therefore created a spool dir and added a printcap entry
for your chosen printer (probably *lp*). This is typically setup as a
"raw" device operating as above. The *ps* printer is defined to
function as a generic PostScript printer especially for printers
which have no native PS support. To achieve this, print jobs are
filtered through an external program before being dumped to the
physical printer. Often, with a filter such as *apsfilter*, this is
achieved by ghostscript (*gs*) which has built-in printer
definitions for most lasers, inkjets and epson-compat. dot matrix
printers. Control of this device is mostly done by amending the
calls to *gs*
> without (in /etc/printcap). No printer names. When I put in the second
> printer the original is commented out and a new filter is installed
> replacing the original filter. Resolution and paper change too. Needless
> to say the two printers require different settings.
lisa is possibly designed to maintain only a single printer attached
to your system. The addition of a second printer you will have to do
manually. The extra printcap entries can probably be uncommented
provided you change the device to /dev/lp1 instead of /dev/lp0. You
will need to ensure /var/spool/lpd/* directories are duplicated too
creating them if necessary. The Printing HOWTOs will probably help.
> Proper definition of non-printing areas is required for each (mainly top
> margin and perf skip for the nec, and all round for hp, bottom and top
Generally the definitions for the HP (set as A4) should be fine. The
wide-carriage NEC may need some work in both printcap and for the
filter (which may not be ghostscript). The printcap entries
will define physical dimensions but StarOffice will
normally output PostScript through a filter which means page
dimensions will also depend on StarOffice page margins and the
margins defined for the filter. Which will dominate may well depend
on your spooling package though I suppose as long as StarOffice
margins are within all the others it shouldn't matter.
> I also want to control headers etc. (A clean sheet must be provided for use
> by star office, to pick up my own standard footers).
Almost all of this is managed by StarOffice independent of lpd. You
can do this by using the */opt/Office51/bin/psetup* tool or whatever
it is for SO v5.1. This tool maintains a file
/opt/Office51/xp3/Xpdefaults as well as individual document
settings. Xpdefaults is worth a read to see what is going on though
*psetup* will do all you need - a users working copy of this file is
stored in ~/Office51/xp3. When printing generally, from any program,
output is piped to the lpd daemon with a command like *lpr
-Pprintername* (in effect references in Xpdefaults contain this
command for each printer you have). The *-Pprintername* is what
directs output to your chosen device where printername is the
printcap name/alias for a printer.
Spooling for all printers can be controlled with *lpc*. Options for
it will vary depending on your print daemon package. The kde print
spooler is possibly an interface to this program or it may be built
for one particular daemon, or both - its broke on my SuSE system.
> The system is Caldera 2.2. 'Printtools' does not exist. In kde 'Coas'
I only ever used Caldera 1.0. There are several printing packages
and filters to choose from so goodness knows what you have (all
printer daemons are called lpd regardless of their origins). The man
page for lpd or lpr may state the origins of your package.
> indicates merely 'ps' and 'lp' with no descriptions. When one tries to
> continue with configuration it goes back to a prompt. No help on 'F2'.
This may be a permissions problem with the Xpdefaults file. You can
edit it by hand; it should also reside in each users directory tree.
Or the program may be broken.
> I can print to the ports ok (in any case both printers have no problems
> under w9x).
You can test raw printing by typing "cat filename /dev/lp?" This
will just dump the contents of filename to your chosen port with NO
data massaging (you will probably get the staircase effect since
unix only use <LF> not a <LF><CR> pair for each new line).
> The only nec listed is a P60 (narrow carriage). Editing of /etc/printcap
> works up to a point, but there seems to be a limit of about 100 on the
Sounds like a filter is interferring. There should be no limit on
the pw entry in printcap; remember that lpd may need to be restarted
before changes to the printcap will be actioned.
> did not see where the actual dimensions are indicated. Hand assignment of
> printer names in /etc/printcap works ok with 'lpr'.
I presume you mean StarOffice is not reacting? Change Xpdefaults
manually or with psetup.
The papersizes (tabloid and ledger) you mention are definitions for
ghostscript so it must be creeping in somewhere. The options
supported by ghostscript are often determined at compile time and
unusual specifications are often left off to reduce the size of the
program - for instance, recent binaries of gs v5.5 have no support
for dot-matrix printers (epson compat.) - this means a recompile.
You can check the printers supported with the command "gs --help".
However, ghostscript is only needed if you need to deal with graphic
dumps (including fonts). If you want to print using the printers
fonts, output to the raw device (without filtering - although just to
confuse things further, some filters are used just to control forms,
copies, pitch changes and simple desirable features unrelated to
> ps I have no experience of unix, so things that might be obvious are in fact
Well, you are getting stuck in getting your hands dirty. Linux
applications almost always have good documentation but often lack
the overview or help on integrating disparate packages together.
Most of the apparent complexity comes from its multiuser nature
which has little relevance in simple single user systems which
therefore ignore or distort basic principles and good practice.
Oddly this was a comment made by a user complaining about the
mysteries of Windows over DOS.
Sysop MOIL BBS +44-1247-273357
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!