Printer follies

Roy Smith roy at phri.UUCP
Thu Dec 15 14:40:27 AEST 1988


	This doesn't really belong on comp.unix.wizards, but there isn't a
comp.unix.bloopers, so here it is.  Maybe rec.humor.funny?

	A couple of weeks ago, a new guy moved in and we had to set him up a
terminal on our Vax.  We didn't have any free tty ports, so we took a line
printer which was attached to a serial line, moved it to the back of a handy
diskless sun, and hooked this guy up to the free port.

	A few days later, he calls up and says that his terminal is locked
up.  I can't figure out what's wrong, but eventually after kill -9'ing his
shell and power-cycling the terminal we get him going again.  Over the next
week or two, this happens again and again every few days.  Really has us
stumped.  Eventually he calls me up and says that he's figured out that it
only happens after he prints a file and forgets to put the - in the -P
argument to lpr (i.e. "% lpr Plaser9 file").  He gets the message "can't open
Plaser9" and then a lot of garbage on his screen, and then his terminal gets
wedged.  At first I didn't believe him, then eventually he demonstrated it to
me and I was able to reproduce it.  I still couldn't figure out what was
going on, but decided to just put a "setenv PRINTER laser9" in his .login and
let it go at that.  This seemed to solve the problem.  Sort of.  He still got
the garbage on his screen, but not as often, and with no correlation to his
running lpr.

	Anyway, to make a long story sort-of-short, it turns out that what
happened was I forgot to take the entry for the old line printer out of
/etc/printcap.  It just happens to be that the printer had the name "lp",
which is, of course, the default printer name if you don't supply a "-P"
argument to lpr (and there is no PRINTER environment variable).  Hence, the
print job would get looped back to his own terminal, but it came out as
garbage because his terminal was running at 9600 and the printcap entry
specified 4800.  Setting PRINTER in his environment kept him from doing it to
himself, but on occassion other people would spool jobs to lp and they would
end up on his screen as well!

	This had been going on for a couple of weeks.  I only figured it out
this afternoon when I happened to be looking at /etc/printcap for some other
reason.  The guy next to me probably thought I was crazy because I started
laughing hystericly out loud.  Nah, he probably thought I was crazy long
ago...
-- 
Roy Smith, System Administrator
Public Health Research Institute
{allegra,philabs,cmcl2,rutgers}!phri!roy -or- phri!roy at uunet.uu.net
"The connector is the network"



More information about the Comp.unix.wizards mailing list