[comp.laser-printers] Apple Laserwriter on a 4.3BSD VAX

grandi@noao.UUCP (Steve Grandi) (08/29/87)

How does one set up a proper /etc/printcap for an Apple Laserwriter on a
4.3BSD system?  I want to run TeX output and ditroff output generated by
Pipeline's devps.

I'm not running Adobe Transcript on the 4.3BSD VAX, but I've cribbed the 
printcap entry from a Sun which is, and the entry is as follows:

lp2|lw2:\
	:lp=/dev/lw:\
	:br#9600:rw:fc#0000374:fs#0000003:xc#0:xs#0040040:mx#0:sf:sb:\
	:sd=/usr/spool/lw2:\
	:lf=/usr/spool/lw2/lw-log:

According to my reading of tty(4), the mode bits set CBREAK and TANDEM and
LDECCTQ and LLITOUT.

I can tip to /dev/lw and converse with the laser printer, and I can
"cat file.ps > /dev/lw" and get nice clean output.  Yet if I 
"lpr -Plw2 file.ps", strange things happen.  The Laserwriter's yellow
light blinks for the appropriate amount of time and I can see lights moving
around down inside the cover release cutout; but no pages are printed.

Any ideas?  Any working printcaps?
-- 
Steve Grandi, National Optical Astronomy Observatories, Tucson, AZ, 602-325-9228
UUCP: {arizona,decvax,hao,ihnp4}!noao!grandi  or  uunet!noao.arizona.edu!grandi 
Internet: grandi@noao.arizona.edu     SPAN/HEPNET: 5356::GRANDI or DRACO::GRANDI

muller%sdcc7@SDCSVAX.UCSD.EDU (Keith Muller) (09/01/87)

One thing that burned us is the xc flag to printcap. xc#0 does nothing.
The xc flag is to "clear local bits". Looking at the code this becomes
a ioctl(xx, TIOCLBIC, ....). From tty(4) :
	TIOCLBIC	arg is a point to an int whose value is a mask
			containing the bits to be CLEARED in the local
			mode word
In other words you put a 1 at each bit position you want cleared. This
was causing our laserwriter to get in weird states (make sure the xc is 
before the xs in the printcap file, the same order applies to fc and fs).
	Keith Muller
	University of California, San Diego

sechrest@mist.cs.orst.EDU (09/03/87)

I was recently working on a system that had this same problem. It seems
that the default behavior for the line printer is to print a banner 
page in front of the file. If you send normal text to the Applewriter,
it decides that the file is not a postscipt file and ignores it until
the end of the file. So the banner always makes the file fail. 

If you use the command: lpr -Plw2 -h file.ps
you should get everything printed. I don't have a Laserwriter 
connected, or I would test this for you. I would suspect, but
I have not tried it, that you could alter the printcap for the 
laserwriter to change the banner page.

					John sechrest
					Oregon State University
					sechrest@cs.orst.edu