[comp.sys.apollo] BSD lpd works:)

fridman@cpsc.ucalgary.ca (fridman) (03/21/91)

This is a followup to a series of posting I made asking for help
in getting BSD printing to run.  It is a summary of what I did to get 
BSD printing running.

At the end is a list of people who replied to my origional postings
and offered additional help.

MY CONFIGURATION
================
       DN4500s, SR10.3, Domain Ring running dds + TCP/IP, named,
       Berkeley printing only with Adobe TranScript filters, ALL NODES
       RUN LPD.

SETTING UP
==========
1. read the "Managing BSD printing" as an INTRO ONLY
2. make sure llbd is running on printer node.
3. make sure lpd is running (I have lpd running on all nodes) and 
   registered  with llbd:
	<print host>% /etc/ncs/lb_admin
	lb_admin: lookup
	...
	      object = *
        	type = *	
	   interface = bsd4.3_lpd
	"BSD4.3 lpd" @ dds://grumpy[1551]

  The above should appear somewhere in the listing.
4. Make sure all of the files mentioned here are readable by daemon.

HOSTNAMES
=========
   For one node to print a file on another, it needs to have "rsh" permission.
   To do this you need to have entries in each of the nodes' /.rhosts files.
   The print node should also have a file called /etc/hosts.lpd that lists
   all the nodes that have permission to print on it.

   If you run an isolated network with simple names like "wimpy" (I assume
   that the entry in /etc/hosts is the same as the one the node is cataloged
   under and the same as returned by hostname) then:

	- create the following files (eg: print host is misty, other nodes 
          are grumpy, lumpy and wimpy)

		misty's /.rhosts:
			misty	daemon
			grumpy	daemon
			lumpy	daemon
			wimpy	daemon
		misty's /etc/hosts.lpd:
			misty
			grumpy
			lumpy
			wimpy
		grumpy's, lumpy's and wimpy's /.rhosts: (no hosts.lpd)
			misty	daemon

  If you run the Berkeley name daemon, then you will need to have the "full"
  (ie: hostname, domain, subnet etc.) name of each node in the above files.  
  The reason you need the "full" name is that during a remote shell request,
  the destination host checks wheather the source host has access by doing
  an internet-to-hostname conversion and looking at the entries in /.rhosts.
  If the apollo named is running, then the /etc/hosts file will not be used
  in the translation.  Instead, the named will be asked, which will return
  the "full" name.

  To find out the "real" name, rlogin to machine you are on and do a who: the
  machine beside your login name is the "real" hostname.

  eg: although hostname and lcnode return "grumpy", the "full" name of this
      node is grumpy.dm2.dm.ucalgary.ca (dm2 is a subdomain of dm) which 
      is what should be put in the above files.

  NOTE: 1. This assumes that daemon has / as the home directory.
	2. Make sure /.rhosts is readable by all.



THE PRINTCAP FILE AND SPOOL DIRECTORIES
=======================================
  If you use the default /etc/printcap from apollo
  make sure the spool directory /usr/spool/lpd/ps, the log file
  /usr/spool/lpd/ps/LOG and the output filter /usr/lib/ps/psof exist.
  NOTE:  this file is for the printer node only.
  (I could't find /usr/lib/ps/psof so I got rid of this line)

  This is what my printcap looks like:

	ps|ps|postscript|PostScript:\
        	:lp=/dev/sio1:sd=/usr/spool/lpd/ps:\
	        :lf=/usr/adm/ps-log:af=/usr/adm/ps.acct:\
	        :br#9600:rw:fc#0000074:fs#0000300:xc#0:xs#0044000:mx#0:sf:sb:\
	        :if=/usr/local/transcript/psif:\
	        :of=/usr/local/transcript/psof:gf=/usr/local/transcript/psgf:\
	        :nf=/usr/local/transcript/psnf:tf=/usr/local/transcript/pstf:\
	        :rf=/usr/local/transcript/psrf:vf=/usr/local/transcript/psvf:\
	        :cf=/usr/local/transcript/pscf:df=/usr/local/transcript/psdf:

  The important part here is the fc,fs,xc and xs fields.  They set the
  parameters of the serial line:

  All nodes except the print node should have the rm=<print node name> field.
  This is what my looks like:
	ps|PostScript|generic PostScript printer:\
        	:lp=:\
	        :rm=grumpy:\
	        :rp=ps:\
	        :sd=/usr/spool/lpd/ps:\
	        :lf=/usr/spool/lpd/ps/LOG:

  Do a "man 4 tty" to find out what the bits are in fc,fs,xc and xs.
  Do a "man pritcap" to find out what the other fields do.

  I don't use the /usr/spool/lpd/servername file.

USING ADOBE TRANSCRIPT
======================
  Transcript is a package from Adobe.  A program called pscomm controls
  the function of a PostScript printer.  It monitors the printer for errors,
  flushes out jobs with errors and prints banner pages.  A set of filters 
  is also provided to convert text, dvi and other formats to PostScript.

  This package is recomended because it properly sets up the printer before
  a job and an end-of-job command is sent after each job.

  Apollo has a product called domain/TranScript which costs $1209 (CDN),
  but I ported the one we already had (and worked on the Suns):)

POSTSCRIPT PRINTER PROBLEMS
===========================
  ...So my test pages were comming out fine but any file longer than 1000 
  bytes would't come out and the error* file in /usr/spool/lpd/ps
  had a line similar to: %%[ framedevice: offending command ]%%.  

  This error from the printer is an indication that its input buffer overran,
  which means that flow control is not working.
  (BTW, this error was flagged by TranScript)

  Well it seems that software flow control is disabled (man a sio_inquire,
  line 166) by default and there is no way to set XON/XOFF using apollo's 
  version of stty (but /com/tctl -insync works for those who also have agis).

  The HACK: add the following to the beggining of pscomm.c:
	system("/com/tctl -insync);
  If you have the agis c libs, you can do it with a call:
	#include <apollo/base.h>
        #include <apollo/sio.h>

       void sio_$control(stream_id,sio_$input_sync,TRUE,status);
       (or something close to that)

ACKNOWLEDGMENTS
===============
  John Mandler 
  Sandeep Srinivasan
  David B Funk
  Bruce Thompson

_END

I know its very long winded, but I hope it helps someone (please let me know
if it worked for you:))

	RF.

rees@pisa.citi.umich.edu (Jim Rees) (03/21/91)

In article <FRIDMAN.91Mar20165441@aa.cpsc.ucalgary.ca>, fridman@cpsc.ucalgary.ca (fridman) writes:
  
  This is a followup to a series of posting I made asking for help
  in getting BSD printing to run.  It is a summary of what I did to get 
  BSD printing running.

Why is this so hard?  And why isn't it in the Apollo documentation?

I've added this writeup to the FAQ file, which has moved from
dabo.ifs.umich.edu to dabo.citi.umich.edu (same machine, same address,
different name).