Subject: Re: How do you set up a parallel printer?
To: Mark C. Gay <markg@teleport.com>
From: Peter James Naylor <e4315555@student.uq.edu.au>
List: amiga-dev
Date: 08/09/1995 23:48:22
On Tue, 8 Aug 1995, Mark C. Gay wrote:

> How do you get a parallel printer working?
> 
> This is vaugely addressed in one of the FAQS, but that description
> seems oriented to 386BSD on a clone and all the books I've looked at
> seem to only address serial printers.

Okay, I'll assume you know how to use the "man" command???

The relevant commands/files that you're looking for help on are lpr, lpq, 
lprm and the /etc/printcap file.  Basically, as with all other aspects of 
UNIX, input and output is based on devices, so in the printcap file, you 
define various pseudo-devices.  Each definition includes details about 
the actual hardware device output should be directed to (/dev/par0), the 
spooling and queue details, and an optional filter for the data stream.

> I assume that it's possible and the result is a vanilla type text only
> output with out some sort of special device driver.

Well with a standard setup, yes, I believe if you queue a text file to 
that printer, it will just send the data unfiltered to the device.  As 
such, if the data includes special escape codes for printer-specific 
code, that's what you'll get.  So far the only program I've found which 
outputs printer-specific or graphical data is Ghostscript.  I am actually 
using ghostscript (and ghostview under X) as a filter in a special 
printer definition I've made in the printcap file.  In this way, I can 
send postscript data to that pseudo-device, and rather than just getting 
sent straight through, ghostscript converts it to the right data to get a 
nice graphical printout of postscript files on my HP Deskjet.  This is a 
common practice, and it shows just how powerfully flexible the 
device-type structure of UNIX is.

> Are there any such drivers out there? 

The drivers may be included in some software (such as Ghostscript), but 
otherwise, it's a matter of working out what data to send to the printer 
device if you want more than plain text.

> Is this the kind of thing that
> has to be compiled into the kernel? 

No, not at all :)

> Any pointers to information on
> how to go about doing this?

I hope that's given you a few starting points, I've only recently worked 
all this stuff out myself...

Peter Naylor