[comp.unix.xenix] different Printers on SCO XENIX 2.3.3

tb@pemstgt.gtc.de (Tillmann Basien) (08/15/90)

hy,
	I want to install more then one printer on SCO XENIX 2.3.3, with
	are attached to the same physikal device. On this device /dev/lp1
	is a laserprinter with manny different emulations.

	Printer 1: ibmlp	/dev/lp1
	Printer 2: hpjet	/dev/lp1
	Printer 3: doku		/dev/lp1
	Printer 4: listing	/dev/lp1


	ibmlp is a pure IBM PRO PRINTER. hpjet is a pure HP Laser Jet +
	doku will print a dokument with a left margin. Listing will print a
	source with 100 lines.

	I have set all the nessery scripts with mkdev lp. All scripts are
	working well. But now my problem:
	If two printing jobs on two different printers are started, the
	printerfiles will be send to the printer in the same time. So in
	one print are fragments for doku and for listing.

	I think I have a lineprinterspooler !!
	What must I do ? Must I write my own spooler, or must I modify my
	scripts, that on script can handle all this printertyps selected
	with -o printing option.

Thanks in advance
Tillmann
-- 
Dipl.Ing. Tillmann Basien                Programmentwicklung fuer Microcomputer
Vaihinger Str.49, PostBox 810165		      +49-711-713047	FAX
7000 Stuttgart 80- West Germany                       +49-711-713045	PHONE

jbayer@ispi.COM (Jonathan Bayer) (08/16/90)

tb@pemstgt.gtc.de (Tillmann Basien) writes:

>hy,
>	I want to install more then one printer on SCO XENIX 2.3.3, with
>	are attached to the same physikal device. On this device /dev/lp1
>	is a laserprinter with manny different emulations.

>	Printer 1: ibmlp	/dev/lp1
>	Printer 2: hpjet	/dev/lp1
>	Printer 3: doku		/dev/lp1
>	Printer 4: listing	/dev/lp1


This is in general NOT A GOOD IDEA.  The spooler expects for there to be
one script for each device, it doesn't do any locking of printer devices
beyond locking the printer name.

A workaround that works most of the time is to put a line at the
beginning of each script that disables all the other printers, and at
the end of the script that re-enables all the other printers.  It is
still possible to get a race condition here, but in general it works
fairly well.

A better solution would be to make the scripts re-spool the print jobs
to another printer.  These scripts would be treated as network printers,
and the final printer defination would be the only script that actually
prints the documents.  I have made this work a while ago, but I don't
have the source.


JB
-- 
Jonathan Bayer		Intelligent Software Products, Inc.
(201) 245-5922		500 Oakwood Ave.
jbayer@ispi.COM		Roselle Park, NJ   07204    

ehjv03@castle.ed.ac.uk (Andrew Smith) (08/16/90)

Disabling printers can cause the scheduler to stop running on a fairly
random basis.

chip@chinacat.Unicom.COM (Chip Rosenthal) (08/16/90)

In article <1990Aug15.151708.6696@pemstgt.gtc.de>
	tb@pemstgt.gtc.de (Tillmann Basien) writes:
>	hpjet is a pure HP Laser Jet +
>	doku will print a dokument with a left margin. Listing will print a
>	source with 100 lines.

Not a good idea running all these different printer queues into a single
device.  Get the "ljinit" program I posted to alt.sources a little while
back.  I call it in my hpjet script, and have it configured locally so I
can do the following things:

	lp -osletter		# use the "letter" setup, 10cpi, wide margins
	lp -oslisting		# use the "listing" setup, 80char lines
	lp -oswide		# 132 char lines
	lp -osland		# landscape printing
	lp -osenv		# envelope printing

-- 
Chip Rosenthal                            |  You aren't some icon carved out
chip@chinacat.Unicom.COM                  |  of soap, sent down here to clean
Unicom Systems Development, 512-482-8260  |  up my reputation.  -John Hiatt

tb@pemstgt.gtc.de (Tillmann Basien) (08/18/90)

jbayer@ispi.COM (Jonathan Bayer) writes:

>tb@pemstgt.gtc.de (Tillmann Basien) writes:

>>hy,
>>	I want to install more then one printer on SCO XENIX 2.3.3, with
>>	are attached to the same physikal device. On this device /dev/lp1
>>	is a laserprinter with manny different emulations.

>>	Printer 1: ibmlp	/dev/lp1
>>	Printer 2: hpjet	/dev/lp1
>>	Printer 3: doku		/dev/lp1
>>	Printer 4: listing	/dev/lp1


>This is in general NOT A GOOD IDEA.  The spooler expects for there to be
>one script for each device, it doesn't do any locking of printer devices
>beyond locking the printer name.

>A workaround that works most of the time is to put a line at the
>beginning of each script that disables all the other printers, and at
>the end of the script that re-enables all the other printers.  It is
>still possible to get a race condition here, but in general it works
>fairly well.

>A better solution would be to make the scripts re-spool the print jobs
>to another printer.  These scripts would be treated as network printers,
>and the final printer defination would be the only script that actually
>prints the documents.  I have made this work a while ago, but I don't
>have the source.
But what happens if someone will cancel his printing jobs. If I understand,
you will collect all printing jobs from different printers to one which
will spool slowly out the date. So you get two printing job ids. The first
on will be told the user, second one will be an annonymos id.
-- 
Dipl.Ing. Tillmann Basien                Programmentwicklung fuer Microcomputer
Vaihinger Str.49, PostBox 810165		      +49-711-713047	FAX
7000 Stuttgart 80- West Germany                       +49-711-713045	PHONE

itkin@mrspoc.Transact.COM (Steven M. List) (08/22/90)

tb@pemstgt.gtc.de (Tillmann Basien) writes:

>hy,
>	I want to install more then one printer on SCO XENIX 2.3.3, with
>	are attached to the same physikal device. On this device /dev/lp1
>	is a laserprinter with manny different emulations.

>	Printer 1: ibmlp	/dev/lp1
>	Printer 2: hpjet	/dev/lp1
>	Printer 3: doku		/dev/lp1
>	Printer 4: listing	/dev/lp1

Barring the program referred to by Chip in his reply...

Assuming that you've already got all the codes needed to set the printer
to its various modes, then instead of using multiple logical printers,
it makes sense to make the specific printers options (as suggested by
Chip) and use the options to send the appropriate initialization codes
to the print.

This would permit a single interface script that has a single controlling
CASE statement to set the printer's operating mode.
-- 
 +----------------------------------------------------------------------------+
 :                Steven List @ Transact Software, Inc. :^>~                  :
 :           Chairman, Unify User Group of Northern California                :
 :     {apple,coherent,limbo,mips,pyramid,ubvax}!itkin@guinan.Transact.COM    :