Local Printer Setup for FreeBSD

Setup of local printers for FreeBSD uses lprng to run a local printer.
The setup involves the alteration/installation of the following:

The FreeBSD computer's currently have lprng installed. Lprng does not
run an lpd daemon on the local machine, the machine's print as clients
to Newton's print server. We currently have cfengine setup to prevent
running programs with lpd and altering files with lpd as part of the
file name.
 
  1. Log into newton as root, and edit the /usr/cfengine/control/cf.freebsd so that lpd is not killed on the machine.
  2. Log into the machine as root. Edit the file /etc/lpd.conf. Change the line 'force_localhost@'  to  'force_localhost'. This tells the computer that it  is a print server.
  3. Test the printer manually to determine whether it is a parallel connection or a serial connection and determine which device the printer is plugged into.
  4. If is a parallel connection, test the printer with 'lptest > /dev/lpt0' This should print a test page. If not try /dev/lpt1 , /dev/lp0 and /dev/lp1
  5. If it is a serial connection, refer to the  FreeBSD Handbook .
  6. Edit /etc/rc. local to include the following: '#local printer setup <EOL>if [ -f /etc/printcap  -a -f /usr/sbin/lpd ] ; then <EOL /usr/sbin/lpd ;  <EOL> fi <EOL> ' This allow lpd to start when the computer is rebooted.
  7. Install apsfilter.  cd /usr/ports/print/apsfilter; make; make install; install apsfilter in /usr/local/share/  and select most of the options IE: we want postscript, etc etc
  8. Setup apsfilter by: cd /usr/local/share/apsfilter and running ./SETUP
  9. You must give apsfilter the following information: device for the printer,  what type of connection (serial or parallell), the spool directories are owned by daemon,  name of printer, location of apsfilterrc for each printer (/etc/apsfilter/) and select a printer driver by trial and error.
  10. ANSWER YES to overwriting the printcap. Otherwise you  must comment out all of newton's printers. NOTE: The first printer listed in the printcap is the default printer.
  11. Run checkpc -f to check the printer setup.
  12. Try to print a test page (both postscript and ascii)
  13. Repeat this until at least ascii files print.  Refer to the  apsfilter webpage  if needed,
  14. Edit the file /etc/apsfilter/printername/apsfilterrc if needed.
  15. Install any files needed to print with IE: dvips postscript stuff etc.
The following is an example of the apsfilterrc which seems to work:
#
# don't delete these settings
#
PRINTER='laserjet'
PAPERSIZE='letter'
METHOD='auto'
RESOLUTION='default'

#
# additional configuration follows
# insert settings as seen in /etc/apsfilter/apsfilterrc
#
# Additional modifications by Heather 10/16/01
# Paths needed
PATH="/usr/local/bin:/usr/local/usr/local/share/usr/local/share:/usr/bin:/bin"

NOTIFY=root

PRINT_DVI=''
HAVE_MAKETEXPK=set

GS_FONTPATH="/usr/local/share/ghostscript/fonts"
GS_LIB="/usr/local/share/ghostscript/5.50/"

#PS_UTILS=

ASCII_FILTER=a2ps