Printing: printcap vs. interface scripts - SCO

This is a discussion on Printing: printcap vs. interface scripts - SCO ; (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 ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: Printing: printcap vs. interface scripts

  1. 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 awacs@ziskind.us
    Attorney and Counselor-at-Law http://ziskind.us
    Economic Group Pension Services http://egps.com
    Actuaries and Employee Benefit Consultants

  2. 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
    ==> http://www.frappr.com/cusm <==

  3. Re: Printing: printcap vs. interface scripts

    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?

    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 awacs@ziskind.us
    Attorney and Counselor-at-Law http://ziskind.us
    Economic Group Pension Services http://egps.com
    Actuaries and Employee Benefit Consultants

  4. Re: Printing: printcap vs. interface scripts

    Jean-Pierre Radley wrote (on Mon, Feb 05, 2007 at 08:03:27PM -0500):
    > 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?


    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.

    > | 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 awacs@ziskind.us
    Attorney and Counselor-at-Law http://ziskind.us
    Economic Group Pension Services http://egps.com
    Actuaries and Employee Benefit Consultants

  5. Re: Printing: printcap vs. interface scripts

    Nachman Yaakov Ziskind wrote:
    > Jean-Pierre Radley wrote (on Mon, Feb 05, 2007 at 08:03:27PM -0500):
    >>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?

    >
    > Wait - you mean that using remote lpr (whatever it's called) is not a
    > printer-by-printer option?


    Using LPR/LPD is a printer by printer decision.

    > That setting up remote printing changes the
    > guts of the lp subsystem?


    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.

    > I'm quite confused


    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 :-)

    >
    > 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.


    Which I expect will ultimately be invoked if you use lp for a printer connected
    via LPD/LPR.

    >>| And, supposing I am using printcap, and want to change to netcat. What
    >>| do I have to rip out?


    Nothing.

    >>|
    >>| The current printer is deep sixing its jobs without a trace, and I'd
    >>| like to try something new ...


    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.

  6. Re: Printing: printcap vs. interface scripts

    In article <45c8b131$0$22111$db0fefd9@news.zen.co.uk>,
    Ian Wilson wrote:
    >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.


    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.

    >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


    Indeed.

    >, 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.


    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 spcecdt@armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/

  7. Re: Printing: printcap vs. interface scripts

    > >>| > | 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?

    >
    > Using LPR/LPD is a printer by printer decision.
    >
    > >That setting up remote printing changes the
    > >guts of the lp subsystem?

    >
    > 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.


    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.

    > It is confusing but so are CUPS, lprng, foomatic and all the other printing
    > toolsets nowadays.


    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.

    > Which I expect will ultimately be invoked if you use lp for a printer
    > connected via LPD/LPR.


    I think I'm getting to the nub of my question: how do(es) me|Unix decide
    if it's so connected?

    > >>| And, supposing I am using printcap, and want to change to netcat. What
    > >>| do I have to rip out?

    >
    > Nothing.
    >
    > >>| The current printer is deep sixing its jobs without a trace, and I'd
    > >>| like to try something new ...

    [Pre-Netcat]

    > 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).


    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 awacs@ziskind.us
    Attorney and Counselor-at-Law http://ziskind.us
    Economic Group Pension Services http://egps.com
    Actuaries and Employee Benefit Consultants

  8. Re: Printing: printcap vs. interface scripts

    Nachman Yaakov Ziskind wrote:
    >
    > > >>| > | 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?

    > >
    > > Using LPR/LPD is a printer by printer decision.
    > >
    > > >That setting up remote printing changes the
    > > >guts of the lp subsystem?

    > >
    > > 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.

    >
    > 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.
    >
    > > It is confusing but so are CUPS, lprng, foomatic and all the other printing
    > > toolsets nowadays.

    >
    > 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.
    >
    > > Which I expect will ultimately be invoked if you use lp for a printer
    > > connected via LPD/LPR.

    >
    > I think I'm getting to the nub of my question: how do(es) me|Unix decide
    > if it's so connected?
    >
    > > >>| And, supposing I am using printcap, and want to change to netcat. What
    > > >>| do I have to rip out?

    > >
    > > Nothing.
    > >
    > > >>| The current printer is deep sixing its jobs without a trace, and I'd
    > > >>| like to try something new ...

    > [Pre-Netcat]
    >
    > > 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).

    >
    > Netcat is working quite nicely, for now. But I have no confidence in my
    > changes until I see the whole picture.


    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.
    >
    > --
    > _________________________________________
    > Nachman Yaakov Ziskind, FSPA, LLM awacs@ziskind.us
    > Attorney and Counselor-at-Law http://ziskind.us
    > Economic Group Pension Services http://egps.com
    > Actuaries and Employee Benefit Consultants



    --

    Steve Fabac
    S.M. Fabac & Associates
    816/765-1670

  9. Re: Printing: printcap vs. interface scripts

    Nachman Yaakov Ziskind wrote:
    >
    > 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.
    >


    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.

+ Reply to Thread