Printers give me RAGE
Got called at 0950 this morning (after missing a call or two 0.5h earlier) that the customer’s printing stuff I updated yesterday didn’t work. The “raw spool” mode or whatever it was called wasn’t ejecting the last page, for starters, and I didn’t see an option in printconf to send a form feed after the end of the job. I fixed that by switching them to text only printers and turning on the “send FF to printer” and “send EOT (end of transmission to printer” options or some such. That pacified them, until…
I got woken up again at about 1315 with them saying they couldn’t
print from Windows. Windows was sending PCL, and the printer kept
saying ERROR: job removal requested in lpq -a output. Giving
-D1 to lpd didn’t do anything useful, and also spammed so much
that if there was anything useful I could easily have missed it.
(P.S.: if you want to use -D1 in the Red Hat setup, it would be
wise just to run /usr/sbin/lpd -F -D1 on a tty and skip the init
script. I think lpd just outputs to stdout/stderr, so I suspect
messages after the initial startup of the daemon are not sent to
syslog. -F runs lpd in the foreground, so you get the plethora of
messages sent to your tty.) Eventually in
/var/spool/lpd/lp0/mf.cfg, which is presumably configuration for
“magicfilter”, I found:
define(PCLfilter, `reject')dnl define(PJLfilter, `reject')dnl
among the lines. I changed the reject to text and voila,
we’re printing from Windows again. This also fixed a problem with
their SCO application and something called “UnForm” which basically
prints things in nice little forms (such as invoices) with lines and
everything.
After all this, we’re just “pretty sure” that the HP DeskJet 940C is now working. I should have run a test while I had the customer on the phone today, but I had already made him run back and forth to that printer so many times that I couldn’t bear to ask him to go over there once more to see if the printouts looked right.
BTW, why is /var/log/spooler always empty, anyway? Apparently
that might just be for UUCP and NNTP stuff, as implied by
/etc/syslog.conf (uucp,news.crit)?
I coded for a while. Refactored my CircularBufferTest and ended
up collapsing all four of my test*() methods into one method,
because they were all so similar. It’s prettier now. I have this
BufferUtils utility class that just has a couple static methods,
and I still feel bad about it. I should probably stop coding and read
more about OO design and “code smell”-type-things for a few hours,
just to get them fresh in the front of my mind. Then I can attack
some refactoring.
I find myself extracting things that can be extracted, such as a few lines of code or a complex-looking calculation, into their own methods as prescribed by XP’s penchant for keeping things simple, and simple also meaning “easily understandable”. I have some really long method names sometime. I should put up CVSweb and stick the code in it so any actual readers can follow along in my pursuits.
Going to go to Mama Ricotta’s tonight hopefully, now that we know it’s moved. I almost walked into the Indian place that moved into their old place of business before my significant other caught my arm and pointed at the sign. Doh.