[Coco] new printer sub system for NitrOS-9
Gene Heskett
gheskett at wdtv.com
Wed Jan 8 15:12:45 EST 2014
On Wednesday 08 January 2014 14:40:38 iggybeans at comcast.net did opine:
> Has anything been done to make NitrOS-9 more compatible with current
> printers? Obviously, something as complicated as a CUPS port would
> probably be too resource intense, but while it seems extreme I could
> see the utility in a PCL compatible driver. Even adding a parallel or
> USB port does not look that difficult with all the mcus that could be
> used to drive a printer port. Obviously I'm not likely to be able to
> gain much support for other enhancements, but trying to use a legacy
> printer is not a good solution, so I wouldn't mind pushing for this.
You can do it right out of dw. I have a couple of co-operating bash
scripts.
Put the dw version of /p in your boot file.
Configure the dw server to save what comes up that channel as a text file
to your hard drive, putting it in a dedicated subdir, which I have 2 of.
Then the top level script forks a copy of inotifywait, watching that
subdir. And sits there sleeping until the fork returns with a filename.
When a file is opened, written and then closed, the close triggers
inotifywait to return that filename to the parent script, which then does a
rename/copy to the other script, which maintains a last 15 round robin
database, sending the current file to the scripted printer, which sends it
through cups on this machine and once rendered into the raster image by
cups, comes marching out of a Brother HL2170 B&W laser sitting on the
coco's desk at nominally 19 pages a minute, starting about 5 seconds after
you get the prompt back on the coco from the "list filename >/p". Clear,
crisp laser image fonts. Or if you are that into nostalgia for the uber-
ugly 5x7 dot matrix fonts from a dmp-105, dw can generate that image too.
But the beauty of modern fonts far exceeds my feelings about trying to
figure out if that variables name is a ell, or its an assigned one. The
pain is not worth it.
The progeniter's of the currently running scripts, which would need fine
tuned for your system anyway, are available on my web page.
Look in Genes-os9-stf for cocodw, and coco_print and dwstart
I just refreshed them with whats running here now. dwstart is the starter
for the server, and sets up the rest of it after starting the server.
Its a lot of bit twiddling, but that is what computers do best, let them do
it, invisibly to you.
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
Cheers, Gene
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Better hope you get what you want before you stop wanting it.
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
law-abiding citizens.
More information about the Coco
mailing list