FreeBSD Print Server

I scored a Lexmark Optra E312L laser printer off Freecycle yesterday.  For those who haven’t done the research, laser printers are THE WAY to go vs inkjets, maybe unless you print color.  Toner is multiple times cheaper and more convenient than ink cartridges plus it doesn’t dry up, and the printers themselves are built to last.

Okay, so now that I have a printer worthy of ownership, I want to share it with my house network so that I can print from any of the four computers here.  That means I want to add “print server” to the lengthy list of jobs my trusty FreeBSD box already handles.

Using lpd

There’s a few options when choosing a print spooler (the software that accepts, queues and dispatches jobs): you could use CUPS from Linux land, or LPRng or PDQ, but I went with the most basic of basic spoolers “lpd” because it comes prepackaged with FreeBSD.  So I started out by following the steps here, to add the Optra E312L as my sole line printer named “lp”:

http://www.wonkity.com/~wblock/docs/html/lpdprinting.html

Following these steps up to the “Adding A Printer” section got me printing ASCII without issue.  But when trying to use Postscript things fell apart, because the Optra E312L doesn’t understand PostScript – only PCL6 or newer.  Okay, so the solution to this is to get a “print driver” that can convert PostScript to PCL.  Solution: ghostscript.

cd /usr/ports/print/ghostscript8-nox11
make install clean

I disabled any X11 and CUPS features, enabled fontconfig and Freetype Bridge (no idea what that does but I do have FreeType already), left all the drivers enabled (compilation fails if you uncheck one of these but I don’t know which one it was) and let it go.  Once the job is complete, the “Adding A Filter” section of that tutorial is usable.  Great, now I have a PostScript-capable laser printer!

Printing from Clients

OSX threw a couple things at me that I was finally able to get around.  lpd opens up port 515 on the server – make sure to firewall this off from the Internet!  Open System Preferences, then Printing, click the plus sign to add a printer.  Click the IP tab.

  • Protocol is LPD
  • Address is 192.168.1.1
  • Queue Name is “lp” (without quotes)
  • Name is whatever you want – I picked “Lexmark Optra E312L”
  • Location is whatever as well – I picked “Server Closet”
  • Type is “Generic PostScript Printer”

Finally, lpd checks /etc/hosts.lpd for a list of who is allowed to print.  Ensure that your static IPs are loaded into /etc/hosts with names, then add the hostnames to hosts.lpd.  Send a test print from the Mac and pray for the best.

I have not tried to set up the printer from my Windows PC yet.

Leave a Reply

Your email address will not be published. Required fields are marked *