Printing: printcap vs. interface scripts
(I have a 505 box with a motley crew of printers, of many different
technologies.) How is OpenServer told that a printer uses /etc/printcap,
as opposed to ../admin/..interfaces? Where may I peek?
Thanks!
--
_________________________________________
Nachman Yaakov Ziskind, FSPA, LLM [email]awacs@ziskind.us[/email]
Attorney and Counselor-at-Law [url]http://ziskind.us[/url]
Economic Group Pension Services [url]http://egps.com[/url]
Actuaries and Employee Benefit Consultants
Re: Printing: printcap vs. interface scripts
Nachman Yaakov Ziskind typed (on Mon, Feb 05, 2007 at 07:07:55PM -0500):
| (I have a 505 box with a motley crew of printers, of many different
| technologies.) How is OpenServer told that a printer uses /etc/printcap,
| as opposed to ../admin/..interfaces? Where may I peek?
If you run 'mkdev rlp' to install remote printing,
then the printcap file comes into play.
If not, not.
--
JP
==> [url]http://www.frappr.com/cusm[/url] <==
Re: Printing: printcap vs. interface scripts
Jean-Pierre Radley wrote (on Mon, Feb 05, 2007 at 07:23:39PM -0500):[color=blue]
> Nachman Yaakov Ziskind typed (on Mon, Feb 05, 2007 at 07:07:55PM -0500):
> | (I have a 505 box with a motley crew of printers, of many different
> | technologies.) How is OpenServer told that a printer uses /etc/printcap,
> | as opposed to ../admin/..interfaces? Where may I peek?
>
> If you run 'mkdev rlp' to install remote printing,
> then the printcap file comes into play.
> If not, not.[/color]
Ok, fair enough.
But suppose I forgot what I did (true), how do I check?
And, supposing I am using printcap, and want to change to netcat. What
do I have to rip out?
The current printer is deep sixing its jobs without a trace, and I'd
like to try something new ...
--
_________________________________________
Nachman Yaakov Ziskind, FSPA, LLM [email]awacs@ziskind.us[/email]
Attorney and Counselor-at-Law [url]http://ziskind.us[/url]
Economic Group Pension Services [url]http://egps.com[/url]
Actuaries and Employee Benefit Consultants
Re: Printing: printcap vs. interface scripts
Jean-Pierre Radley wrote (on Mon, Feb 05, 2007 at 08:03:27PM -0500):[color=blue]
> Nachman Yaakov Ziskind typed (on Mon, Feb 05, 2007 at 07:56:05PM -0500):
> | Jean-Pierre Radley wrote (on Mon, Feb 05, 2007 at 07:23:39PM -0500):
> | > Nachman Yaakov Ziskind typed (on Mon, Feb 05, 2007 at 07:07:55PM -0500):
> | > | (I have a 505 box with a motley crew of printers, of many different
> | > | technologies.) How is OpenServer told that a printer uses /etc/printcap,
> | > | as opposed to ../admin/..interfaces? Where may I peek?
> | >
> | > If you run 'mkdev rlp' to install remote printing,
> | > then the printcap file comes into play.
> | > If not, not.
> |
> | Ok, fair enough.
> |
> | But suppose I forgot what I did (true), how do I check?
>
> Check the symlink of /bin/lp, maybe?[/color]
Wait - you mean that using remote lpr (whatever it's called) is not a
printer-by-printer option? That setting up remote printing changes the
guts of the lp subsystem? I'm quite confused.
This particular system has no /bin/lp, but is has it in /usr/bin:
# l -Wv /usr/bin/lp
---x--s--x 1 bin lp 2600 Mar 30 2000 /usr/bin/lp ->
/var/opt/K/SCO/Unix/5.0.5Eb/usr/bin/lp
and it has /usr/lpd/[local|remote]/lp.
[color=blue]
> | And, supposing I am using printcap, and want to change to netcat. What
> | do I have to rip out?
> |
> | The current printer is deep sixing its jobs without a trace, and I'd
> | like to try something new ...[/color]
--
_________________________________________
Nachman Yaakov Ziskind, FSPA, LLM [email]awacs@ziskind.us[/email]
Attorney and Counselor-at-Law [url]http://ziskind.us[/url]
Economic Group Pension Services [url]http://egps.com[/url]
Actuaries and Employee Benefit Consultants
Re: Printing: printcap vs. interface scripts
Nachman Yaakov Ziskind wrote:[color=blue]
> Jean-Pierre Radley wrote (on Mon, Feb 05, 2007 at 08:03:27PM -0500):[color=green]
>>Nachman Yaakov Ziskind typed (on Mon, Feb 05, 2007 at 07:56:05PM -0500):
>>| Jean-Pierre Radley wrote (on Mon, Feb 05, 2007 at 07:23:39PM -0500):
>>| > Nachman Yaakov Ziskind typed (on Mon, Feb 05, 2007 at 07:07:55PM -0500):
>>| > | (I have a 505 box with a motley crew of printers, of many different
>>| > | technologies.) How is OpenServer told that a printer uses /etc/printcap,
>>| > | as opposed to ../admin/..interfaces? Where may I peek?
>>| >
>>| > If you run 'mkdev rlp' to install remote printing,
>>| > then the printcap file comes into play.
>>| > If not, not.
>>|
>>| Ok, fair enough.
>>| But suppose I forgot what I did (true), how do I check?
>>
>>Check the symlink of /bin/lp, maybe?[/color]
>
> Wait - you mean that using remote lpr (whatever it's called) is not a
> printer-by-printer option?[/color]
Using LPR/LPD is a printer by printer decision.
[color=blue]
> That setting up remote printing changes the
> guts of the lp subsystem?[/color]
Yes, when you set up LPR/LPD, the print system is amended so that using LPR/LPD
becomes an available option. The guts of the printing system are altered to
accomodate this new option. You can see this in lpstat etc.
As far as I know, the lpstat or lp command that you invoke, will eventually
invoke another lpstat or lp that is specific to the printing-system for the
specified printer.
[color=blue]
> I'm quite confused[/color]
It is confusing but so are CUPS, lprng, foomatic and all the other printing
toolsets nowadays.
AIUI /etc/printcap is BSDish and was originally used on BSDish Unixes for both
local and networked printers. When SCO added LPR/LPD to their SysVish O/Ss they
only used printcap for remote LPR/LPD printers. I think it resulted in a bit of
a hybrid mess of two different printing models, but a worse mess[1] was to come
when OSR6 lets you have both CUPS and SYSV printing installed :-)
[color=blue]
>
> This particular system has no /bin/lp, but is has it in /usr/bin:
> # l -Wv /usr/bin/lp
> ---x--s--x 1 bin lp 2600 Mar 30 2000 /usr/bin/lp ->
> /var/opt/K/SCO/Unix/5.0.5Eb/usr/bin/lp
>
> and it has /usr/lpd/[local|remote]/lp.[/color]
Which I expect will ultimately be invoked if you use lp for a printer connected
via LPD/LPR.
[color=blue][color=green]
>>| And, supposing I am using printcap, and want to change to netcat. What
>>| do I have to rip out?[/color][/color]
Nothing.
[color=blue][color=green]
>>|
>>| The current printer is deep sixing its jobs without a trace, and I'd
>>| like to try something new ...[/color][/color]
I'd follow the netcat recipes at pcunix.com (if you can find them :-) I think
the nicest recipes involve a common print "model" for netcat that looks in a new
file /etc/printers for details of specific printers. This integrates nicely with
the local printer admin tools. (Older recipies have you create a new filter for
every printer).
[1] By which I mean potential for confusion.
Re: Printing: printcap vs. interface scripts
In article <45c8b131$0$22111$db0fefd9@news.zen.co.uk>,
Ian Wilson <scobloke2@infotop.co.uk> wrote:[color=blue]
>Nachman Yaakov Ziskind wrote:
>As far as I know, the lpstat or lp command that you invoke, will eventually
>invoke another lpstat or lp that is specific to the printing-system for the
>specified printer.[/color]
Yes, that's correct. Those parts of the print systems that conflict (lp,
lpstat, cancel, lpmove) are replaced by front ends that invoke one of two back
ends under /usr/lpd.
[color=blue]
>AIUI /etc/printcap is BSDish and was originally used on BSDish Unixes for both
>local and networked printers. When SCO added LPR/LPD to their SysVish O/Ss they
>only used printcap for remote LPR/LPD printers. I think it resulted in a bit of
>a hybrid mess of two different printing models[/color]
Indeed.
[color=blue]
>, but a worse mess[1] was to come
>when OSR6 lets you have both CUPS and SYSV printing installed :-)
>[1] By which I mean potential for confusion.[/color]
Probably true, but in at least one respect the OSR6 situation is better.
In the 507 MP that added CUPS, if you install CUPS yet another layer of
redirection is added: front ends that invoke either the CUPS or SYSV binaries,
where the SYSV binaries are either the binaries for the lpsched system or the
front end binaries for the lpsched/lpd system, if you've previously installed
lpd. The actual CUPS and SYSV binaries are under /usr/lib/lp. This shuffling
around of binaries based on whether you've installed lpd and cups is quite
messy.
In OSR6 it's at least somewhat cleaned up, in that there is no more moving
binaries around! When the OS is installed you get front ends that select
between interfaces for the cups, lpsched, and lpsched/lpd systems. Switching
between the systems is something that's done dynamically via arguments to the
front-ends or by configuration in /etc/default/lpd. Whether the lpd, CUPS, and
lpsched systems is installed determines only whether those back ends are
available to be switched between.
The lpsched/lpd front end system was kept because it allows at least those two
print systems to be merged in the sense that their front ends can select a
back-back-end by knowing which printers are supported by each, while between
CUPS and those systems the selection must be explicit.
Of course, CUPS supports lpd printers, so if you don't have legacy interface
scripts and such you can just use CUPS and forget about the other systems.
John
--
John DuBois [email]spcecdt@armory.com[/email] KC6QKZ/AE [url]http://www.armory.com/~spcecdt/[/url]
Re: Printing: printcap vs. interface scripts
> >>| > | technologies.) How is OpenServer told that a printer uses[color=blue][color=green][color=darkred]
> >>/etc/printcap,
> >>| > | as opposed to ../admin/..interfaces? Where may I peek?
> >>| >
> >>| > If you run 'mkdev rlp' to install remote printing,
> >>| > then the printcap file comes into play.
> >>| > If not, not.
> >>|
> >>| Ok, fair enough.
> >>| But suppose I forgot what I did (true), how do I check?
> >>
> >>Check the symlink of /bin/lp, maybe?[/color]
> >
> >Wait - you mean that using remote lpr (whatever it's called) is not a
> >printer-by-printer option?[/color]
>
> Using LPR/LPD is a printer by printer decision.
>[color=green]
> >That setting up remote printing changes the
> >guts of the lp subsystem?[/color]
>
> Yes, when you set up LPR/LPD, the print system is amended so that using
> LPR/LPD becomes an available option. The guts of the printing system are
> altered to accomodate this new option. You can see this in lpstat etc.
>
> As far as I know, the lpstat or lp command that you invoke, will eventually
> invoke another lpstat or lp that is specific to the printing-system for the
> specified printer.[/color]
So, back to square one: how do I tell (a generation later) which printer
invokes what? I have two printers (more or less identical) left; they both
have entries in printcap; only one has an interface script.
[color=blue]
> It is confusing but so are CUPS, lprng, foomatic and all the other printing
> toolsets nowadays.[/color]
Yes! CUPS is (on the Linuxen I've installed) FAR, FAR worse: there are
some things in CUPS that *just do not work*, no matter how many times
you read the FM/newsgroup, etc. It just doesn't go.
Whereas, with SCO, there *is* a printing solution. You may have to go to
Checkpoint Charlie at midnight and hand over a bag of Krugerrands to get
it, but it is there.
[color=blue]
> Which I expect will ultimately be invoked if you use lp for a printer
> connected via LPD/LPR.[/color]
I think I'm getting to the nub of my question: how do(es) me|Unix decide
if it's so connected?
[color=blue][color=green][color=darkred]
> >>| And, supposing I am using printcap, and want to change to netcat. What
> >>| do I have to rip out?[/color][/color]
>
> Nothing.
>[color=green][color=darkred]
> >>| The current printer is deep sixing its jobs without a trace, and I'd
> >>| like to try something new ...[/color][/color][/color]
[Pre-Netcat]
[color=blue]
> I'd follow the netcat recipes at pcunix.com (if you can find them :-) I
> think the nicest recipes involve a common print "model" for netcat that
> looks in a new file /etc/printers for details of specific printers. This
> integrates nicely with the local printer admin tools. (Older recipies have
> you create a new filter for every printer).[/color]
Netcat is working quite nicely, for now. But I have no confidence in my
changes until I see the whole picture.
--
_________________________________________
Nachman Yaakov Ziskind, FSPA, LLM [email]awacs@ziskind.us[/email]
Attorney and Counselor-at-Law [url]http://ziskind.us[/url]
Economic Group Pension Services [url]http://egps.com[/url]
Actuaries and Employee Benefit Consultants
Re: Printing: printcap vs. interface scripts
Nachman Yaakov Ziskind wrote:[color=blue]
>[color=green][color=darkred]
> > >>| > | technologies.) How is OpenServer told that a printer uses
> > >>/etc/printcap,
> > >>| > | as opposed to ../admin/..interfaces? Where may I peek?
> > >>| >
> > >>| > If you run 'mkdev rlp' to install remote printing,
> > >>| > then the printcap file comes into play.
> > >>| > If not, not.
> > >>|
> > >>| Ok, fair enough.
> > >>| But suppose I forgot what I did (true), how do I check?
> > >>
> > >>Check the symlink of /bin/lp, maybe?
> > >
> > >Wait - you mean that using remote lpr (whatever it's called) is not a
> > >printer-by-printer option?[/color]
> >
> > Using LPR/LPD is a printer by printer decision.
> >[color=darkred]
> > >That setting up remote printing changes the
> > >guts of the lp subsystem?[/color]
> >
> > Yes, when you set up LPR/LPD, the print system is amended so that using
> > LPR/LPD becomes an available option. The guts of the printing system are
> > altered to accomodate this new option. You can see this in lpstat etc.
> >
> > As far as I know, the lpstat or lp command that you invoke, will eventually
> > invoke another lpstat or lp that is specific to the printing-system for the
> > specified printer.[/color]
>
> So, back to square one: how do I tell (a generation later) which printer
> invokes what? I have two printers (more or less identical) left; they both
> have entries in printcap; only one has an interface script.
>[color=green]
> > It is confusing but so are CUPS, lprng, foomatic and all the other printing
> > toolsets nowadays.[/color]
>
> Yes! CUPS is (on the Linuxen I've installed) FAR, FAR worse: there are
> some things in CUPS that *just do not work*, no matter how many times
> you read the FM/newsgroup, etc. It just doesn't go.
>
> Whereas, with SCO, there *is* a printing solution. You may have to go to
> Checkpoint Charlie at midnight and hand over a bag of Krugerrands to get
> it, but it is there.
>[color=green]
> > Which I expect will ultimately be invoked if you use lp for a printer
> > connected via LPD/LPR.[/color]
>
> I think I'm getting to the nub of my question: how do(es) me|Unix decide
> if it's so connected?
>[color=green][color=darkred]
> > >>| And, supposing I am using printcap, and want to change to netcat. What
> > >>| do I have to rip out?[/color]
> >
> > Nothing.
> >[color=darkred]
> > >>| The current printer is deep sixing its jobs without a trace, and I'd
> > >>| like to try something new ...[/color][/color]
> [Pre-Netcat]
>[color=green]
> > I'd follow the netcat recipes at pcunix.com (if you can find them :-) I
> > think the nicest recipes involve a common print "model" for netcat that
> > looks in a new file /etc/printers for details of specific printers. This
> > integrates nicely with the local printer admin tools. (Older recipies have
> > you create a new filter for every printer).[/color]
>
> Netcat is working quite nicely, for now. But I have no confidence in my
> changes until I see the whole picture.[/color]
My recommendation is that once you have netcat up and running, deep six the
/etc/printcap file (mv printcap printcap.out) then run lpstat -t and see
what complaints you get (probably none). I use /the /etc/printers file
to set up all my printers netcat and otherwise.
Google "Boy, I like netcat" to see my printeradmin script and /etc/printers
modifications. Using printeradmin and /etc/printers, it's easy to setup
additional printers, or remove them all and set them back up again:
# printeradmin
Usage: printeradmin add <- create all printers in /etc/printers
printeradmin delete <- delete all printers in /etc/printers
Usage: printeradmin add name <- create named printer in /etc/printers
printeradmin delete name <- delete named printer in /etc/printers
Much nicer then using mkdev lp and adding one printer at a time when
moving to new hardware and/or upgrading operating systems.[color=blue]
>
> --
> _________________________________________
> Nachman Yaakov Ziskind, FSPA, LLM [email]awacs@ziskind.us[/email]
> Attorney and Counselor-at-Law [url]http://ziskind.us[/url]
> Economic Group Pension Services [url]http://egps.com[/url]
> Actuaries and Employee Benefit Consultants[/color]
--
Steve Fabac
S.M. Fabac & Associates
816/765-1670
Re: Printing: printcap vs. interface scripts
Nachman Yaakov Ziskind wrote:[color=blue]
>
> So, back to square one: how do I tell (a generation later) which printer
> invokes what? I have two printers (more or less identical) left; they both
> have entries in printcap; only one has an interface script.
>[/color]
I don't know a good answer for that. You might be able to work it out by
staring long and hard at the output of lpstat -pDl (I think that's
right, I don't have an OSR5 system available this minute).
In general, for two printers it doesn't seem worth worrying too much
about. I'd get netcat working for the two printers, test all the apps
that need to print to them, then if you must tidy up, nuke all the other
printer definitions from /etc/printcap and from `scoadmin printers`.
The "right" answer to your question is, of course, "consult your notes".
But printer configs are one of those areas where mysterious detritus
seems to build up as printers come and go over the years.