edflecko at gmail.com
Tue Sep 21 20:12:40 UTC 2010
I'm not sure if this will help you, but here's what I did on my
network to print directly to an HP LaserJet on my LAN.
Pick a name (and a few convenient aliases) for the printer, and put
them in the /etc/printcap file.
hp and officehp -> what I have named my printer (two names)
sh -> disables a banner from printing
rm -> I.P. address of the remote printer
sd -> my spool directory
mx -> max file size (o=unlimited)
lf -> error file
if -> input filter
# mkdir /var/spool/lpd/officehp
# touch /var/log/officehp
# chown daemon:daemon /var/spool/lpd/officehp
# chmod 770 /var/spool/lpd/officehp
# touch /usr/local/libexec/if-simple
# vi /usr/local/libexec/if-simple
# if-simple - Simple text input filter for lpd
# Installed in /usr/local/libexec/if-simple
# Simply copies stdin to stdout. Ignores all filter arguments.
/bin/cat && exit 0
Now make the file executable:
# chmod 555 /usr/local/libexec/if-simple
Note: A copy of the if-simple script can be found in the
Let's try and print!
lpd is run from /etc/rc, controlled by the lpd_enable variable. This
variable defaults to NO. If you have not done so already, add the
to /etc/rc.conf, and then either restart your machine, or just run lpd
lptest 20 20 | lpr -Pofficehp
More information about the freebsd-questions