Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Apr 2001 23:16:29 -0700
From:      "Ted Mittelstaedt" <>
To:        <>, <freebsd-questions@FreeBSD.ORG>
Subject:   RE: Printer madness...
Message-ID:  <000001c0c573$9bc40680$>
In-Reply-To: <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
The /etc/printcap file needs to be _exactly_ correct, and I
mean exact - one wrong character and it won't work.

While the first printcap entry that you showed _looks_ correct,
did you by any chance use spaces in front of the


and other lines?  This should be a _single_ tab character.

As far as the _second_ entry, the problem there is that you
have no leading colon in front of the



I suggest that you start with the second entry (ie: printcap
entry without filters) and correct the missing leading colon,
and as well make sure there are no trailing spaces after
the \ at the end of the line, also make sure there's no other
entries in the printcap, not even a trailing blank line at the
end of the file.  Get that working then start fiddling with

The out-of-the-box FreeBSD installation has /etc/printcap all
set up for printing the lp printer out of the parallel port.
If you made a backup of this file before starting to edit the
printcap file, then try that.  If you didn't - well then consider
that a lesson for the future, and go over the existing /etc/printcap
with a fine-toothed comb.

The printing chapter of my book is up on Daemonnews - you might want
to read it.

Ted Mittelstaedt            
Author of:          The FreeBSD Corporate Networker's Guide
Book website:

>-----Original Message-----
>From: owner-freebsd-questions@FreeBSD.ORG
>[mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Michael O'Henly
>Sent: Saturday, April 14, 2001 8:08 PM
>To: freebsd-questions@FreeBSD.ORG
>Subject: Printer madness...
>I'm trying to set up printing with FreeBSD 4.2 and an HP LaserJet 4050
>connected to the parallel port. I've been following the procedure in the
>Handbook -- but I'm having some trouble...
>Here's what I've done so far:
>1.  Compiled a new kernel with these options:
># Parallel port
>device		ppc0	at isa? irq 7
>device		ppbus		# Parallel port bus (required)
>device		lpt0		# Printer
>device		plip		# TCP/IP over parallel
>device		ppi		# Parallel port interface device
>device		vpo		# Requires scbus and da
>(As you can see, there are options enabled that I don't need. My
>approach so
>far has been to get the basic services running, then go back and
>turn off the
>things I don't need.)
>2.  When I do 'dmesg | grep lpt' I get this:
>lpt0: <Printer> on ppbus0
>lpt0: Interrupt-driven port
>3.  I've done '/dev/MAKEDEV lpt0' and checked to make sure it worked:
># ls -asl /dev/lpt*
>0 crw-------  1 root  wheel   16,   0 Apr 14 19:23 /dev/lpt0
>0 crw-------  1 root  wheel   16,   1 Apr 12 15:05 /dev/lpt1
>0 crw-------  1 root  wheel   16,   2 Apr 12 15:05 /dev/lpt2
>4.  Tested communication to printer by printing a test Postscript file:
># cat > /dev/lpt0
>No problems with this.
>5.  Created the following /etc/printcap entry:
>lp|hp4050|HP LaserJet 4050:\
>	:sh:\
>	:lp=/dev/lpt0:\
>	:sd=/var/spool/lpd/lp:\
>	:lf=/var/log/lp-errs:\
>	:if=/usr/local/libexec/psif:\
>	:df=/usr/local/libexec/psdf:\
>	:tf=/usr/local/libexec/pstf:
>FWIW, I've tested the following pared-down version as well (with identical
>	:sh:\
>	:lp=/dev/lpt0:\
>	sd=/var/spool/lpd/lp:
>6.  Made a spooling directory and made it private to the print daemon:
># mkdir /var/spool/lpd/lp
># chmod 770 /var/spool/lpd/lp
>7.  Installed and made executable some print filters. (Note that
>I've tested
>without filter entries in /etc/printcap and had identical resutls.)
>8.  Added to /etc/rc.conf:
>9.  Rebooted.
>10. At this point, tests like "lptest 20 5 | lpr -Plp" and even just 'lpr'
>result in 'lpr: lp: unknown printer '.
>I'm stumped. Any advice?
>Michael O'Henly
>TENZO Design
>To Unsubscribe: send mail to
>with "unsubscribe freebsd-questions" in the body of the message

To Unsubscribe: send mail to
with "unsubscribe freebsd-questions" in the body of the message

Want to link to this message? Use this URL: <$9bc40680$1401a8c0>