BSD lpr question

Piercarlo Grandi pcg at cs.aber.ac.uk
Wed Sep 26 23:34:10 AEST 1990


On 21 Sep 90 11:36:19 GMT, C.Elvin at ee.surrey.ac.uk said:

Elvin> Ron Nash <nash at ucselx.sdsu.edu> write:

Nash> Is there a way to set up two line printers to appear as one
Nash> printer queue?  We have two laser printer queues that I want the
Nash> users to see as a single printer.  The system is running BSD 4.3.

Get and install the PLP (public/portable line printer) package or MDQS.
Both are available at major FTP sites near you... PLP was also posted (a
fairly old version I think) to comp.sources.unix. They are both a
definite improvement over BSD or USG line printing, and can be used also
for batch jobs etc...

Elvin> All output sent to ttyqf will be readable on ptyqf so have a
Elvin> process which opens up ptyqf and read print jobs, and then write
Elvin> this input to any number of 'real' printers according to any
Elvin> chosen scheduling strategy.  This is a quick and effective
Elvin> solution and it only 'costs' one pseudo-tty pair.

Even quicker would be to skip the pty pair business entirely -- tsk tsk.
Just use an UNIX domain socket, like the LP daemon does, and write an
lpd-to-lpd protocol Y-shaped-pipe daemon; say you listen on
'/dev/lp1or2', and each print job is jsut copied to '/dev/lp1' or
/dev/lp2', which are the UNIX domain sockets on which the respective
'real' lpds will br listening.

Of course using such a Y-pipe filter is less efficient (each job is
copied twice again, especially bad for printing stdouts) then using a
daemon that will directly manager two output queues. PLP will do that,
and also MDQS, if I remember well.
--
Piercarlo "Peter" Grandi           | ARPA: pcg%uk.ac.aber.cs at nsfnet-relay.ac.uk
Dept of CS, UCW Aberystwyth        | UUCP: ...!mcsun!ukc!aber-cs!pcg
Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg at cs.aber.ac.uk



More information about the Comp.unix.internals mailing list