{"id":356,"date":"2010-11-20T10:09:00","date_gmt":"2010-11-20T10:09:00","guid":{"rendered":"http:\/\/thomas.w-p.me.uk\/blog\/2010\/11\/freenas-as-print-server\/"},"modified":"2010-11-20T10:09:00","modified_gmt":"2010-11-20T10:09:00","slug":"freenas-as-print-server","status":"publish","type":"post","link":"https:\/\/thomas.w-p.me.uk\/blog\/2010\/11\/freenas-as-print-server\/","title":{"rendered":"FreeNAS as print server"},"content":{"rendered":"<p>I didn&#8217;t go to bed&#8230;<\/p>\n<p>I worked through <a href=\"http:\/\/sourceforge.net\/apps\/phpbb\/freenas\/viewtopic.php?f=13&#038;t=2116&#038;start=0&#038;hilit=print+server\">the instructions<\/a>\u00a0and realised that they were for an &#8220;embedded&#8221; FreeNAS, where I am running a FULL install. \u00a0I worked out that all I needed to do was make the permanent changes that are outlined in the script. \u00a0I also didn&#8217;t want to use a RAM disk so changed the printcap file to that suggested in the <a href=\"http:\/\/www.instructables.com\/id\/FreeNAS-as-a-Print-Server\/step6\/LPRng-Configuration-1-of-3-printcap\/\">Instructable I found<\/a>, and created the appropriate directory.<\/p>\n<p><span><i>\u00a0\u00a0 \u00a0# \u00a0 @(#)printcap \u00a0 Canon i550<br \/>\u00a0\u00a0 \u00a0lp|deskjet:\\<br \/>\u00a0\u00a0 \u00a0:sd=<b>\/var\/spool\/lpd\/bare<\/b>:\\<br \/>\u00a0\u00a0 \u00a0:sh:\\<br \/>\u00a0\u00a0 \u00a0:lp=\/dev\/ulpt0:<\/i><\/span><\/p>\n<p>My devd.conf turned out like this (I don&#8217;t have a speaker on the fit-PC slim:<\/p>\n<p><span><i>\u00a0\u00a0 \u00a0# devd.conf<br \/>\u00a0\u00a0 \u00a0# start action when USB printer ulpt0 is plugged in<br \/>\u00a0\u00a0 \u00a0# wait 3 seconds and then start the spooler daemon<br \/>\u00a0\u00a0 \u00a0#<br \/>\u00a0\u00a0 \u00a0attach 100 {<br \/>\u00a0\u00a0 \u00a0\u00a0\u00a0 device-name &#8220;ulpt0&#8221;;<br \/>\u00a0\u00a0 \u00a0\u00a0\u00a0 action &#8220;sleep 3; lpd;<br \/>\u00a0\u00a0 \u00a0\u00a0\u00a0 checkpc -f;<br \/>\u00a0\u00a0 \u00a0\u00a0\u00a0 chown 0:0 \/dev\/ulpt0;<br \/>\u00a0\u00a0 \u00a0\u00a0\u00a0 chmod 666 \/dev\/ulpt0;&#8221;;<br \/>\u00a0\u00a0 \u00a0};<\/i><\/span><\/p>\n<p>I did all the file linking as per the script, rebooted and&#8230;<\/p>\n<p>Nothing happened when I tried to print.<\/p>\n<p>So I went through the script. <\/p>\n<p>First I found that I had not given the spooling script the right permissions (700) or ownership (1:1).<br \/>Next I ran checkpc and was reminded of this error:<br \/>&#8220;Shared object &#8220;libintl.so.8&#8243; not found&#8221;<\/p>\n<p>I got over this somehow last time using <a href=\"http:\/\/forums.freebsd.org\/showthread.php?t=14672\">these<\/a> <a href=\"http:\/\/forums.freebsd.org\/showthread.php?t=14655\">threads<\/a> and working out that the code was:<\/p>\n<p><span><i>\u00a0\u00a0 \u00a0ln -s \/usr\/local\/lib\/libintl.so.9 \/usr\/local\/lib\/libintl.so.8<\/i><\/span><i><\/p>\n<p><span> It still didn&#8217;t work. \u00a0I looked at the \/usr\/bin and my symlinks had disappeared, so I copied over the files instead. \u00a0It still didn&#8217;t work. \u00a0I tried a manual print to lpr and got:<\/span><\/i><br \/><i><span><br \/><\/span><\/i><br \/><i><span><span><i><span><i>\u00a0\u00a0 \u00a0<\/i><\/span>lpr \/mnt\/data\/printtest.prn\u00a0<\/i><\/span><\/span><\/i><br \/><span><i><span><i>\u00a0\u00a0 \u00a0<\/i><\/span>Status Information, attempt 1 of 3:<\/i><\/span><br \/><span><i><span><i>\u00a0\u00a0 \u00a0<\/i><\/span>sending job &#8216;root@minime+2078&#8217; to lp@localhost<\/i><\/span><br \/><span><i><span><i>\u00a0\u00a0 \u00a0<\/i><\/span>connecting to &#8216;localhost&#8217;, attempt 1<\/i><\/span><br \/><span><i><span><i>\u00a0\u00a0 \u00a0<\/i><\/span>cannot open connection to localhost &#8211; No such file or directory<\/i><\/span><br \/><span><i><span><i>\u00a0\u00a0 \u00a0<\/i><\/span>Make sure the remote host supports the LPD protocol<\/i><\/span><br \/><span><i><span><i>\u00a0\u00a0 \u00a0<\/i><\/span>Waiting 10 seconds before retry<\/i><\/span><\/p>\n<div><\/div>\n<p><i><span>So I rebooted and tried again. Again.<\/span><\/i><br \/><i><span><br \/><\/span><\/i><br \/><i><span>Out popped the print job! \u00a0Ubuntu suddenly showed the printer as alive and I was away.<\/span><\/i><br \/><i><span><br \/><\/span><\/i><br \/><i><span>I go to bed happy. \u00a0Hope this helps someone. \u00a0Please comment if it does.<\/span><\/i><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I didn&#8217;t go to bed&#8230; I worked through the instructions\u00a0and realised that they were for an &#8220;embedded&#8221; FreeNAS, where I am running a FULL install. \u00a0I worked out that all I needed to do was make the permanent changes that are outlined in the script. \u00a0I also didn&#8217;t want to use a RAM disk so &hellip; <a href=\"https:\/\/thomas.w-p.me.uk\/blog\/2010\/11\/freenas-as-print-server\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">FreeNAS as print server<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-356","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/posts\/356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/comments?post=356"}],"version-history":[{"count":0,"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/posts\/356\/revisions"}],"wp:attachment":[{"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/media?parent=356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/categories?post=356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/tags?post=356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}