Subject: default /etc/printcap
To: netbsd-help <netbsd-help@netbsd.org>
From: James K. Lowden <jklowden@schemamania.org>
List: netbsd-help
Date: 03/17/2002 11:35:18
Hi, 

I just installed a very nice little postscript printer (Lexmark E322) and have been learning about lpd and friends and cousins.  I think it's weird that the vanilla NetBSD installation has no built-in printing capacity.  It's simple enough to change, so I think my question is: Why is it like that?  

It looks to me like anyone who's serious about printing installed LPRng, and anyone who doesn't, isn't.  But I think the base system could be a little more user friendly.  

At a minimum, couldn't we have a working "lp" entry in printcap, one that passed its input to a reasonable default output device [1]?  It took me a couple of hours to read all the docs before I figured out that 

#lp|local line printer:\
#       :lp=/dev/lp:sd=/var/spool/lpd/lp:lf=/var/log/lpd-errs:

should be 

lp|local line printer|Lexmark E322:\
        :lp=/dev/lpa1:sd=/var/spool/lpd/lp:lf=/var/log/lpd-errs:sh:

Most of that time was spent isolating the origin of garbage showing up on page one.  First I had to bypass lpd to make sure the postscript was OK, then I guessed it might be a banner page of some sort, and then I had to guess that

    sh   bool  false    suppress printing of burst page header

meant I needed ":sh:" in my printcap entry.  I realize that interpolating ten year old UCB documentation is part of my unix indoctrination/assimilation, and I'm OK with that, but I still think the system should be more approachable for the unsimilarly inclined.  

The handbook describes creating a filter to handle the staircase problem, and refers to lpf.  (My 1.5 system doesn't have a man page for lpf, btw.)  Seems to me the default printcap entry should handle staircasing, since most non-ps printers need CR.  
Also, I think it would be very nice if there was a simple way to print man pages to printers that accept ascii input.  I wouldn't take much for 

	man foo | lp -d lpman

to work, out of the box.  

If I submit a patch for 

	/etc/printcap, printcap(5), and lpf(4?)

that provides for these things, what are the chances it'll be accepted?  

Thanks for listening.  

--jkl

[1] 	Reasonable output device.  I think most machines, maybe all, have a notion of "first output device", a place where a printer, if any, is hooked up.  It would be nice if /dev/MAKEDEV created such a device, perhaps "/dev/lp", that would help us do the Right Thing.  But then, we could also use /dev/floppy, /dev/cdrom, and /dev/modem, too.