[Coco] new printer sub system for NitrOS-9

Aaron Wolfe aawolfe at gmail.com
Wed Jan 8 16:32:17 EST 2014


On Wed, Jan 8, 2014 at 3:12 PM, Gene Heskett <gheskett at wdtv.com> wrote:
> 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.
>

As a simpler alternative, you can specify a command using the
FlushCommand option in your config.xml.

DW will execute the specified command after a page is printed.  If
present, the literal string $file is replaced with the full path to
the file just printed.

So:

<FlushCommand>/do/my/awesome/thing.sh $file</FlushCommand>

for example.

This setting is definable per printer, and you can define as many
printers as you like, so if for instance you have 2 physical printers
you could make two corresponding printer defs in config.xml, each with
a command that sends the file to the respective printer.  You can then
toggle between them at the OS9 command prompt with the dw command or
in the DW GUI.

-Aaron



More information about the Coco mailing list