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:
-
Altering cf.freebsd on Newton.
-
Altering /etc/lpd.conf on the computer.
-
Altering /etc/printcap on the computer.
-
Altering /etc/rc.local on the computer.
-
Setup of spool directory with appropriate owner's and permission.
-
Installation of printer filter - apsfilter.
-
Configuration of printcap etc.
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.
-
Log into newton as root, and edit the /usr/cfengine/control/cf.freebsd
so that lpd is not killed on the machine.
-
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.
-
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.
-
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
-
If it is a serial connection, refer to the FreeBSD
Handbook .
-
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.
-
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
-
Setup apsfilter by: cd /usr/local/share/apsfilter and running ./SETUP
-
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.
-
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.
-
Run checkpc -f to check the printer setup.
-
Try to print a test page (both postscript and ascii)
-
Repeat this until at least ascii files print. Refer to the
apsfilter webpage if needed,
-
Edit the file /etc/apsfilter/printername/apsfilterrc if needed.
-
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