tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Foomatic-ability for LPR


currently, as far as I am aware, it is impossible for NetBSD's lpr
to pass any options to (foomatic-)filters at runtime, which is
obviously suboptimal. Adding such support would enable lpr to
print on a huge variety of {,non-}postscript printers, both modern
and ancient. According to foomatic's documentation, there are
two(-and-a-half) choices for changing this:

(1) Pass an option "-j <string>" or "-Z <string>" to the filter;
(2) Add a variable "LPOPTS" containing the desired parameters to
the filter's environment.

Both are easily done, and the differences are pretty minor;
nonetheless, unless any committer just picks this up and implements
it without further discussion, I thought I'd ask before coming up
with a patch, if one is desired at all. One should note:

 * OpenBSD has been passing for four years "-j" to external filters,
 abusing the "-J jobname" option to lpr. This seems suboptimal to
 me as it's (a) abusive, and (b) could, though unlikely, break
 existing filters (whoever writes such) that don't ignore unknown
 options, even if "-J" is intended to actually carry a jobname.

 * LPRng's lpr uses "-Z". This would at least circumvent the somewhat
 academic problem with existing filters as mentioned above, because
 there is no overloading of options involved.

 * Using an environment variable would probably work seamlessly as
 well. This would make filter code a little uglier, though, if a
 filter already interprets command line options.

It remains the question of how to extend lpr's options. On this
side, using "-J" would be most unintrusive, though I'd vote for
adding a new option "-Z", which would also make NetBSD's lpr behave
more like LPRng's lpr, which may be desirable as it could ease
writing scripts for both lpr implementations, if they don't already
differ too much WRT options; I don't know.

Firstly, sorry for the long text on such a small matter; secondly,
does anyone have any comments on this?


Dennis den Brok

Home | Main Index | Thread Index | Old Index