{"id":43,"date":"2011-02-09T21:38:36","date_gmt":"2011-02-09T21:38:36","guid":{"rendered":"http:\/\/greg-kennedy.com\/?p=43"},"modified":"2011-02-09T22:04:15","modified_gmt":"2011-02-09T22:04:15","slug":"freebsd-print-server","status":"publish","type":"post","link":"https:\/\/greg-kennedy.com\/wordpress\/2011\/02\/09\/freebsd-print-server\/","title":{"rendered":"FreeBSD Print Server"},"content":{"rendered":"<p><a href=\"http:\/\/greg-kennedy.com\/wordpress\/wp-content\/uploads\/2011\/02\/41X3XMQGXEL._printer-shop-and-accessories_.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-medium wp-image-44\" title=\"Lexmark Optra E312L\" src=\"wp-content\/uploads\/2011\/02\/41X3XMQGXEL._printer-shop-and-accessories_-300x222.jpg\" alt=\"\" width=\"300\" height=\"222\" srcset=\"https:\/\/greg-kennedy.com\/wordpress\/wp-content\/uploads\/2011\/02\/41X3XMQGXEL._printer-shop-and-accessories_-300x222.jpg 300w, https:\/\/greg-kennedy.com\/wordpress\/wp-content\/uploads\/2011\/02\/41X3XMQGXEL._printer-shop-and-accessories_.jpg 500w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>I scored a Lexmark Optra E312L laser printer off Freecycle yesterday. \u00a0For those who haven&#8217;t done the research, laser printers are THE WAY to go vs inkjets, maybe unless you print color. \u00a0Toner is multiple times cheaper and more convenient than ink cartridges plus it doesn&#8217;t dry up, and the printers themselves are built to last.<\/p>\n<p>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. \u00a0That means I want to add &#8220;print server&#8221; to the lengthy\u00a0list of jobs my trusty FreeBSD box already handles.<\/p>\n<p><strong>Using lpd<\/strong><\/p>\n<p>There&#8217;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 &#8220;lpd&#8221; because it comes prepackaged with FreeBSD. \u00a0So I started out by following the steps here, to add the Optra E312L as my sole line printer named &#8220;lp&#8221;:<\/p>\n<p><a href=\"http:\/\/www.wonkity.com\/~wblock\/docs\/html\/lpdprinting.html\">http:\/\/www.wonkity.com\/~wblock\/docs\/html\/lpdprinting.html<\/a><\/p>\n<p>Following these steps up to the &#8220;Adding A Printer&#8221; section got me printing ASCII without issue. \u00a0But when trying to use Postscript things fell apart, because the Optra E312L doesn&#8217;t understand PostScript &#8211; only PCL6 or newer. \u00a0Okay, so the solution to this is to get a &#8220;print driver&#8221; that can convert PostScript to PCL. \u00a0Solution: ghostscript.<\/p>\n<pre><span style=\"font-family: Georgia, 'Bitstream Charter', serif; color: #444444;\"><span style=\"line-height: 22px;\">cd \/usr\/ports\/print\/ghostscript8-nox11\r\nmake install clean<\/span><\/span><\/pre>\n<p><span style=\"color: #444444; font-family: Georgia, 'Bitstream Charter', serif; line-height: 24px; white-space: normal; font-size: 16px;\">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&#8217;t know which one it was) and let it go. \u00a0Once the job is complete, the &#8220;Adding A Filter&#8221; section of that tutorial is usable. \u00a0Great, now I have a PostScript-capable laser printer!<\/span><\/p>\n<p><strong>Printing from Clients<\/strong><\/p>\n<p>OSX threw a couple things at me that I was finally able to get around. \u00a0lpd opens up port 515 on the server &#8211; make sure to firewall this off from the Internet! \u00a0Open System Preferences, then Printing, click the plus sign to add a printer. \u00a0Click the IP tab.<\/p>\n<ul>\n<li>Protocol is LPD<\/li>\n<li>Address is 192.168.1.1<\/li>\n<li>Queue Name is &#8220;lp&#8221; (without quotes)<\/li>\n<li>Name is whatever you want &#8211; I picked &#8220;Lexmark Optra E312L&#8221;<\/li>\n<li>Location is whatever as well &#8211; I picked &#8220;Server Closet&#8221;<\/li>\n<li>Type is &#8220;Generic PostScript Printer&#8221;<\/li>\n<\/ul>\n<p>Finally, lpd checks \/etc\/hosts.lpd for a list of who is allowed to print. \u00a0Ensure that your static IPs are loaded into \/etc\/hosts with names, then add the hostnames to hosts.lpd. \u00a0Send a test print from the Mac and pray for the best.<\/p>\n<p>I have not tried to set up the printer from my Windows PC yet.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I scored a Lexmark Optra E312L laser printer off Freecycle yesterday. \u00a0For those who haven&#8217;t done the research, laser printers are THE WAY to go vs inkjets, maybe unless you print color. \u00a0Toner is multiple times cheaper and more convenient than ink cartridges plus it doesn&#8217;t dry up, and the printers themselves are built to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-43","post","type-post","status-publish","format-standard","hentry","category-hardware"],"_links":{"self":[{"href":"https:\/\/greg-kennedy.com\/wordpress\/wp-json\/wp\/v2\/posts\/43","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/greg-kennedy.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/greg-kennedy.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/greg-kennedy.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/greg-kennedy.com\/wordpress\/wp-json\/wp\/v2\/comments?post=43"}],"version-history":[{"count":5,"href":"https:\/\/greg-kennedy.com\/wordpress\/wp-json\/wp\/v2\/posts\/43\/revisions"}],"predecessor-version":[{"id":49,"href":"https:\/\/greg-kennedy.com\/wordpress\/wp-json\/wp\/v2\/posts\/43\/revisions\/49"}],"wp:attachment":[{"href":"https:\/\/greg-kennedy.com\/wordpress\/wp-json\/wp\/v2\/media?parent=43"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/greg-kennedy.com\/wordpress\/wp-json\/wp\/v2\/categories?post=43"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/greg-kennedy.com\/wordpress\/wp-json\/wp\/v2\/tags?post=43"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}