Date: Tue, 21 Sep 2010 13:12:39 -0700 From: Ed Flecko <edflecko@gmail.com> To: freebsd-questions@freebsd.org Subject: Re: printcap Message-ID: <AANLkTimmavKt-EGGmxitOxf7XO3y2dc83KktbVA5NrEA@mail.gmail.com> In-Reply-To: <4C990766.7080305@nagual.nl> References: <4C990766.7080305@nagual.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
Dick, 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|officehp:\ :sh:\ :rm=192.168.1.50:\ :sd=/var/spool/lpd/officehp:\ :mx#0:\ :lf=/var/log/officehp:\ :if=/usr/local/libexec/if-simple: 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 #!/bin/sh # # 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 exit 2 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 /usr/share/examples/printing directory. 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 line: lpd_enable="YES" to /etc/rc.conf, and then either restart your machine, or just run lpd # lpd lptest 20 20 | lpr -Pofficehp Ed
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimmavKt-EGGmxitOxf7XO3y2dc83KktbVA5NrEA>