How to set up a network-attached printer

Warren Block wblock at wonkity.com
Sun Oct 14 08:08:55 PDT 2007


perryh at pluto.rain.com wrote:

> Where would I find a specific method for setting up a Samsung ML-2571N 
> network-attached PostScript printer in FreeBSD 6.1? I'm hoping for 
> something less generic than what I've found in the handbook.

Less generic?  I think the Handbook printing section is complicated by 
too much detail, or maybe too much of the wrong kind.

Anyway, it's usually three steps:

Set up DNS for the printer:

     # for example, in /etc/hosts...
     192.168.1.250    netlaser

Create print queue dir:

     mkdir -p /var/spool/lpd/netlaser
     chmod 770 /var/spool/lpd/netlaser

Make /etc/printcap entry with rm= and rp= :

     netlaser:\
             :lp=:\
             :sh:\
             :mx#0:\
             :rm=netlaser:\
             :rp=raw:\
             :sd=/var/spool/lpd/netlaser:\
             :lf=/var/log/lpd-errs:

Print to it with

     lpr -Pnetlaser file-to-print.ps

For extra points, add another printcap entry for lp: that will print 
plain text.  /usr/ports/print/enscript* is nice for that, or lots of 
people use /usr/ports/print/apsfilter so they can send about anything to 
the printer and let it do the conversion.

-Warren Block * Rapid City, South Dakota USA


More information about the freebsd-questions mailing list