home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / sgi / admin / 137 < prev    next >
Encoding:
Internet Message Format  |  1993-01-07  |  10.6 KB

  1. Path: sparky!uunet!olivea!sgigate!odin!twilight!news.csd.sgi.com!lodi.csd.sgi.com!niblett
  2. From: niblett@lodi.csd.sgi.com (Ray Niblett)
  3. Newsgroups: comp.sys.sgi.admin
  4. Subject: Re: Printing with lpr on an IRIS
  5. Message-ID: <1993Jan7.193405.20079@news.csd.sgi.com>
  6. Date: 7 Jan 93 19:34:05 GMT
  7. References: <1993Jan7.165829.28175@athena.mit.edu>
  8. Sender: news@news.csd.sgi.com (Net News CSD)
  9. Organization: Silicon Graphics, Inc.
  10. Lines: 407
  11.  
  12. On solution is to set up lpr such that it sends all files to 
  13. lp:
  14.  
  15.  
  16.  
  17.  
  18.                       Silicon Graphics Technical Support
  19.         ____________________________________________________________
  20.  
  21.         Integrating    The AT&T Spooler With The BSD LPR Print    Spooler
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.         ____________________________________________________________
  29.        |             Support Statement               |
  30.        |___________________________________________________________|
  31.        |           SGI      does      not      support           |
  32.        |           configuring    the BSD    LPR print           |
  33.        |           spooler locally (you     can  not           |
  34.        |           have     the  printer  physically           |
  35.        |           connected to    an  SGI     system).           |
  36.        |           If  you  want  to  be  a print           |
  37.        |           server then you will     need  to           |
  38.        |           refer  to  the  Communications           |
  39.        |           guide for setting up     printers           |
  40.        |           for    the  SYSTEM V LP spooling           |
  41.        |           system.                       |
  42.        |           However, SGI    system users have           |
  43.        |           requested     any    available           |
  44.        |           information on  this     subject,           |
  45.        |           whether    or    not      it   is           |
  46.        |           supported.                       |
  47.        |___________________________________________________________|
  48.  
  49.         You    can  not  use  the  System  Manager's  printer    tool  to
  50.         configure  a  BSD  LPR  spooling system, nor can you use the
  51.         mknetpr(1M)    command    for configuring    a network printer.  Both
  52.         of    these  utilities  only    support    the SYSTEM V LP    spooling
  53.         system.
  54.         This document will assist you in  configuring  the    IRIS  so
  55.         that  other    systems    will be    able to    submit print jobs to the
  56.         LPR    spooler, which will then pass the job to the LP     spooler
  57.         for    local printing.
  58.         Before beginning to     use  this  document,  you  should  have
  59.         already configured and tested the LP print spooler.
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.         ____________________________________________________________
  74.  
  75.         February 13, 1992        -xx              Page 1
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.                       Silicon Graphics Technical Support
  85.         ____________________________________________________________
  86.  
  87.         Verifying the BSD LPR Subsystem was    Properly Installed
  88.  
  89.  
  90.  
  91.         The    BSD LPR    subsystem is  only  available  on  IRIX     version
  92.         3.3.1 or greater.  If you have an earlier release/version of
  93.         the    IRIX Operating System you will need  to     upgrade  to  at
  94.         least  3.3.1  prior     to  proceeding     with  the  installation
  95.         instructions.  You should be able to verify    the  version  of
  96.         software  that  you     are  running  by entering the following
  97.         command:
  98.          #  uname  -r
  99.         Enter the following    command    to verify that the BSD LPR print
  100.         spooling system was    properly installed.
  101.          #  versions  long  |  grep  eoe2.sw.bsdlpr
  102.         Your output    should be:
  103.          eoe2.sw.bsdlpr       etc/init.d/lpd
  104.          eoe2.sw.bsdlpr       etc/printcap
  105.          eoe2.sw.bsdlpr       etc/rc0.d/K26lpd
  106.          eoe2.sw.bsdlpr       etc/rc2.d/S61lpd
  107.          eoe2.sw.bsdlpr       usr/bsd/lpq
  108.          eoe2.sw.bsdlpr       usr/bsd/lpr
  109.          eoe2.sw.bsdlpr       usr/bsd/lprm
  110.          eoe2.sw.bsdlpr       usr/bsd/lptest
  111.          eoe2.sw.bsdlpr       usr/etc/lpc
  112.          eoe2.sw.bsdlpr       usr/etc/lpd
  113.          eoe2.sw.bsdlpr       usr/etc/pac
  114.          eoe2.sw.bsdlpr       usr/lib/lpf
  115.          eoe2.sw.bsdlpr       usr/spool/lpd
  116.         The    BSD spooler is not loaded by default.  Most  users  will
  117.         have  to  use  inst(1M)  and  select  the  manual option, to
  118.         install this subsystem.
  119.         Please make    sure you execute the versions command  (versions
  120.         long  | grep eoe2.sw.lpr) to verify    that you have the entire
  121.         subsystem loaded.  Just having an /etc/printcap file is  not
  122.         enough.
  123.         If you don't have the subsystem installed and would    like  to
  124.         do    the  installation  please  refer  to your Release Notes,
  125.         Installation guide or the System Administrator's Guide.
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.         ____________________________________________________________
  140.  
  141.         February 13, 1992        -xx              Page 2
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.                       Silicon Graphics Technical Support
  151.         ____________________________________________________________
  152.  
  153.         Configuring    the /etc/printcap file
  154.  
  155.  
  156.  
  157.         You    will need  to  edit  the  /etc/printcap     file  manually.
  158.         Please  make  sure    you  format  the entries correctly.  The
  159.         /etc/printcap file expects information in a     format     similar
  160.         to /etc/termcap.
  161.         This document will show you    an example of how  to  configure
  162.         each  option  of the printcap file on separate lines.  There
  163.         will be explanations of both examples.
  164.         Please note    that the printcap  file     is  very  sensitive  to
  165.         syntax  errors.   The  name     field    must  begin at the first
  166.         character on a line    of the /etc/printcap file.  The     printer
  167.         names  must     be  separated by pipe symbols (the vertical bar
  168.         ``|'').  The name line  must  be  terminated  with    a  colon
  169.         followed  by a backslash (``:\'').    Make sure that there are
  170.         no spaces, tabs, or    any other character after the backslash.
  171.         The     definition  lines  must  begin     with  a  tab  character
  172.         followed  by  a colon (``:''), followed by the field you are
  173.         defining, followed by an equal sign.   The    definition  line
  174.         must end with a colon.  If you are using multiple lines, see
  175.         example two.
  176.         There is only one name and five definition fields that  must
  177.         be specified.  They    are:
  178.  
  179.         name  This should be all  the  names  the  printer    will  be
  180.           accessed  as.      It  should  include  ``lp'' so ``lpr''
  181.           without a printer  name  will     work.     The  names  are
  182.           separated with pipe symbols.
  183.  
  184.         :lp=  (line    printer) The name of the  device  to  use.   Use
  185.           /dev/null.
  186.  
  187.         :sd=  (spool  directory)  The  name     of  your  local   spool
  188.           directory.   If  you    don't  use the default directory
  189.           /usr/spool/lpd, you will need    to create the  directory
  190.           by using the mkdir(1M) command.
  191.  
  192.         :lf=  (log    file)  This  is      the    LPR   log   file.    Use
  193.           /usr/spool/lpd/lp-log.
  194.  
  195.         :sh      (supress header) This     will  supress    the  LPR  header
  196.           (banner)  page.   It    has  no     affect    on the LP banner
  197.           page.
  198.  
  199.         :of=  (output filter) This is the name of the filter to send
  200.           all  output  through.      Use /usr/spool/lp/etc/lprtolp.
  201.           You will create this file in this procedure.
  202.  
  203.  
  204.  
  205.         ____________________________________________________________
  206.  
  207.         February 13, 1992        -xx              Page 3
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.                       Silicon Graphics Technical Support
  217.         ____________________________________________________________
  218.  
  219.         Configuring    the /etc/printcap file
  220.  
  221.  
  222.  
  223.         Printcap example(/etc/printcap)
  224.  
  225.          lp:\
  226.              :lp=/dev/null:\
  227.              :sd=/usr/spool/lpd:\
  228.              :lf=/usr/spool/lpd/lp-log:\
  229.              :sh:\
  230.              :of=/usr/spool/lp/etc/lprtolp:
  231.         The    printer    can be accessed    by the following name:
  232.          lp
  233.         The    local spool directory is called:
  234.          /usr/spool/lpd
  235.         The    device where the LPR spooler will actually  output  data
  236.         is    /dev/null.   This  is  because the data    will actually be
  237.         sent to the    LP spooler by lprtolp before LPR can output it.
  238.         The    log file for LPR is:
  239.          /usr/spool/lpd/lp-log
  240.         The    output filter for LPR is:
  241.          /usr/spool/lp/etc/lprtolp
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.         ____________________________________________________________
  272.  
  273.         February 13, 1992        -xx              Page 4
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.                       Silicon Graphics Technical Support
  283.         ____________________________________________________________
  284.  
  285.         Configuring    for Lprtolp
  286.  
  287.  
  288.  
  289.         You    will need to  edit  the     /usr/spool/lp/etc/lprtolp  file
  290.         manually.  Please make sure    you format the lines correctly.
  291.         The    first line of the file must begin with ``#!'',    followed
  292.         by a single    space, followed    by /bin/sh.
  293.  
  294.          #! /bin/sh
  295.          lp -s
  296.  
  297.         The    shell /bin/sh will be invoked when the filter is called.
  298.         All    input to this filter will be sent to:
  299.          lp -s
  300.         Other options may be appropriate for LP  depending    on  your
  301.         particular printer type and    configuration.
  302.  
  303.         You    will also need to  set    permission  correctly  for  this
  304.         script to execute:
  305.          #  chown  lp  /usr/spool/lp/etc/lprtolp
  306.          #  chgrp  lp  /usr/spool/lp/etc/lprtolp
  307.          #  chmod  755    /usr/spool/lp/etc/lprtolp
  308.  
  309.  
  310.  
  311.         Configuring    for Remote Access
  312.         Put    the hostname of    any systems that will want to  print  in
  313.         your /etc/hosts.equiv file,    and verify that    their IP address
  314.         and    hostname appear    in their  /etc/hosts  file.   They  will
  315.         need  to  add  the    your  IP  address  and hostname    to their
  316.         /etc/hosts file.
  317.  
  318.  
  319.  
  320.          Configuring the log file
  321.         You    will need  to  make  a    log  file  and    set  permissions
  322.         accordingly:
  323.          #  touch  /usr/spool/lpd/lp-log
  324.          #  chmod  644    /usr/spool/lpd/lp-log
  325.          #  chown  lp  /usr/spool/lpd/lp-log
  326.          #  chgrp  lp  /usr/spool/lpd/lp-log
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.         ____________________________________________________________
  339.  
  340.         February 13, 1992        -xx              Page 5
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.                       Silicon Graphics Technical Support
  350.         ____________________________________________________________
  351.  
  352.         Attempting to Print    Using the LPR command
  353.  
  354.  
  355.  
  356.         Now    that you have the /etc/printcap     file  configured,  make
  357.         sure  that    the  daemon  is     running.   Enter  the following
  358.         command:
  359.          #  ps    -ef  |    grep  lpd
  360.         Your system    should return something    similar    to:
  361.          root    195    1   0   11:06:04      ?    0:00 /usr/etc/lpd
  362.          root  1293  753   2   13:20:39     ttyq6    0:00 grep lpd
  363.         The    /usr/etc/lpd at    the end    of the lines indicates that  the
  364.         daemon  is    running.   If you only got one line back (``grep
  365.         lpd''), then start the lpd daemon by entering the  following
  366.         command:
  367.          #  /usr/etc/lpd
  368.         Now    if you do ``ps -ef | grep lpd''    you should see    2  lines
  369.         returned to    you.
  370.         From the configuration  pages,  note  that    the  printer  is
  371.         accessed  by  the  name lp.     By default the    lpr command will
  372.         look for the entry lp in the /etc/printcap file.
  373.  
  374.         Now    enter the command:
  375.          lpr  filename
  376.  
  377.         After submitting your request to the printer.  You    can  see
  378.         if    your  job  has    made  it  to the print spooling    queue by
  379.         entering the following command:
  380.          #  lpq
  381.         Your system    should return something    similar    to:
  382.          lp is ready and printing
  383.          Rank  Owner  Job  Files     Total Size
  384.          1st    guest 113  filename     851 bytes
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.         ____________________________________________________________
  405.  
  406.         February 13, 1992        -xx              Page 6
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413. -- 
  414.  
  415. Ray Niblett  
  416.  
  417. PSE, Silicon Graphics
  418. niblett@sgi.com
  419.