<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Lâmôlabs &#187; printing</title>
	<atom:link href="http://www.lamolabs.org/blog/tag/printing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lamolabs.org/blog</link>
	<description>Lame Oh Labs .... Linux &#38; Tech! Is there anything else?</description>
	<lastBuildDate>Thu, 09 Sep 2010 15:02:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Howto Install Windows Print Drivers onto a Central Samba Share</title>
		<link>http://www.lamolabs.org/blog/2118/howto-install-windows-print-drivers-onto-a-central-samba-share/</link>
		<comments>http://www.lamolabs.org/blog/2118/howto-install-windows-print-drivers-onto-a-central-samba-share/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 06:31:52 +0000</pubDate>
		<dc:creator>slmingol</dc:creator>
				<category><![CDATA[tutorials]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[printing]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://www.lamolabs.org/blog/?p=2118</guid>
		<description><![CDATA[<p>If you&#8217;ve followed my blog for a while you&#8217;ve probably noticed that I like to automate just about everything. I can&#8217;t stand doing anything manual, at least more than once. So of course when I setup a network printer, I like to have the Windows drivers that go along with each printer available automagically over [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve followed my blog for a while you&#8217;ve probably noticed that I like to automate just about everything. I can&#8217;t stand doing anything manual, at least more than once. So of course when I setup a network printer, I like to have the <strong>Windows drivers</strong> that go along with <strong>each printer available</strong> automagically <strong>over the network</strong>. This technique isn&#8217;t glaringly obvious so I thought I&#8217;d quickly document how I accomplished it.</p>

<h4>Background</h4>

<p>This technique requires that you already have both <strong>Samba</strong> &amp; <strong><span class="caps">CUPS</span></strong> servers setup and configured. You should also already have the <strong>printer</strong> whose drivers we&#8217;re going to install <strong>configured</strong> and working through <strong><span class="caps">CUPS</span></strong>. You can read how I did this for the <strong><span class="caps">MFC</span>-8480DN</strong> printer in this <a href="http://www.lamolabs.org/blog/1487/getting-a-brother-mfc-8480dn-printerscannerfax-and-openvz-to-play-nice-on-centos-5">previous post</a>.</p>

<h4>Getting Started</h4>

<p>First things first, you typically want to grab a copy of the <strong>Windows drivers</strong> for your particular printer. Remember, in this example I&#8217;m using the network capable, <strong>Brother <span class="caps">MFC</span>-8480DN</strong>, that I discussed in this <a href="http://www.lamolabs.org/blog/1487/getting-a-brother-mfc-8480dn-printerscannerfax-and-openvz-to-play-nice-on-centos-5">previous post</a>. I downloaded the Windows drivers from the Brother&#8217;s website <a href="http://welcome.solutions.brother.com/BSC/Public/Templates/DownloadTop.aspx?NRMODE=Published&amp;NRNODEGUID=%7B2C7B4D65-D5B3-47BF-958E-322BE5EFDCA8%7D&amp;NRORIGINALURL=%2fbsc%2fpublic%2fus%2fus%2fen%2fdlf%2fdownload_top.html%3freg%3dus%26c%3dus%26lang%3den%26prod%3dmfc8480dn_us&amp;NRCACHEHINT=NoModifyGuest&amp;prod=mfc8480dn_us&amp;reg=us&amp;c=us&amp;lang=en">here</a>. Here&#8217;s a link the <a href="http://welcome.solutions.brother.com/BSC/public/agreement2.aspx?c=us&amp;lang=English&amp;prod=mfc8480dn_us&amp;osname=win_2k&amp;viewmode=0&amp;guid=362d6eef-7f6a-4ece-80b4-2400b83058fd&amp;dlid=dlf003792&amp;flang=8&amp;dlfileseq=1">specific driver bundle</a> that I used. Brother calls this bundle the <strong>&#8220;Add Printer Wizard Driver&#8221;</strong>. I then set them aside, so I could focus on getting the special Samba share, <strong>print$</strong>, configured. This is a <strong>special share</strong> where <strong>print drivers</strong> for <strong>all versions of Windows</strong> can be staged, for later consumption by Windows client systems that add this printer.</p>

<h4>Samba</h4>

<h5>adding the print$ share</h5>

<p>For my setup, which is a CentOS 5 system, I added the following stanza to my /etc/samba/smb.conf file.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p21186"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code" id="p2118code6"><pre class="ini" style="font-family:monospace;"># /etc/samba/smb.conf
&nbsp;
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>print$<span style="">&#93;</span></span>
  <span style="color: #000099;">comment</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Printer Driver Download Area</span>
  <span style="color: #000099;">path</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> /etc/samba/drivers</span>
  <span style="color: #000099;">browseable</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> yes</span>
  guest ok <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> yes</span>
  read only <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> yes</span>
  write list <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> @samba-printers, root</span></pre></td></tr></table></div>




<p><strong><span class="caps">NOTE</span>:</strong> The unpacked driver files that get added to the <strong>print$</strong> share will be stored under <strong>/etc/samba/drivers</strong> on the <strong>Samba server</strong>. You can put them really anywhere, but I chose to keep them with the Samba config. files.</p>

<h5>samba-printers Linux Group</h5>

<p>Next, I created a special Linux group that I arbitrarily called <strong>samba-printers</strong>. Users in this group, in addition to root, will be the <strong>only users</strong> that have <strong>permission</strong> to <strong>add</strong> Windows drivers to the <strong>print$</strong> Samba share. I accomplished this by adding the line below to the <strong>/etc/group</strong> file on the <strong>Samba server</strong>.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p21187"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p2118code7"><pre class="ini" style="font-family:monospace;"># /etc/group file on Samba server
&nbsp;
samba-printers:x:<span style="">1020</span>:root,user1,user2</pre></td></tr></table></div>




<p>The 2 user accounts, user1 &amp; user2, are both <strong>Linux accounts</strong> as well as <strong>Windows accounts</strong>. In my home network I typically create them this way to make things like this simpler. If you happen to user different user accounts on Windows vs. Linux you can map the Windows accounts to Linux accounts through the Samba config. file <strong>/etc/samba/smbusers</strong>.</p>

<h5>creating /etc/samba/drivers</h5>

<p>Next, I created the <strong>directory</strong> <strong>/etc/samba/drivers</strong> and permissioned it with our newly created Linux group using these commands:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p21188"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p2118code8"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-m</span> ug+rwx,o-w,g+s <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>samba<span style="color: #000000; font-weight: bold;">/</span>drivers
<span style="color: #c20cb9; font-weight: bold;">chgrp</span> samba-printers <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>samba<span style="color: #000000; font-weight: bold;">/</span>drivers</pre></td></tr></table></div>




<p><span id="more-2118"></span></p>

<h5>restarting Samba</h5>

<p>Finally I needed to restart the Samba server.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p21189"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p2118code9"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>smbd restart</pre></td></tr></table></div>




<h4>Installing a Print Driver to print$</h4>

<h5>uncompressing drivers</h5>

<p>Now I turned my attention back to that driver bundle I downloaded previously. <span class="caps">BTW, </span>the file I downloaded in that step was called <strong>8480-USB2KXPVISTA-32-A-US.EXE</strong>. On one of my Windows <span class="caps">PC&#8217;</span>s I created a directory called c:\mfc-8480dn. I then uncompressed the <strong>8480-USB2KXPVISTA-32-A-US.EXE</strong> file into this directory.</p>

<h5>installing the <span class="caps">CUPS </span>printer</h5>

<p>Still on the Windows PC: I brought up the Windows <strong>Run dialog box</strong> by selecting the <strong>Start Menu &#8211;&gt; Run&#8230;</strong>. In the Run dialog I typed <strong>\\bart\mfc-8480dn</strong>. This then took me through the process of adding the <span class="caps">CUPS </span>managed <span class="caps">MFC</span>-8480DN printer to my system. Once I added this printer to my Windows <span class="caps">PC&#8217;</span>s I brought up the properties dialog for this printer. You can typically find these icons under the <strong>Window&#8217;s Control Panel</strong> under something called <strong>Printers</strong> in Windows 2000 or <strong>Printers and Faxes</strong> in Windows <span class="caps">XP.</span> Here&#8217;s a screenshot of my <strong>Printers</strong> folder on my Windows 2000 box.</p>

<div id="attachment_2286" class="wp-caption aligncenter" style="width: 660px"><a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_01.png" rel="lightbox[2118]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_01-650x552.png" alt="printers" title="ss_win_print_drivers_on_samba_01" width="650" height="552" class="size-medium wp-image-2286" /></a><p class="wp-caption-text">printers</p></div>

<h5>Copying the files to print$</h5>

<p>To start this process I first right clicked on the newly added printer, <strong><span class="caps">MFC</span>-8480DN on bart</strong>, and selected <strong>Properties</strong>. I was then presented with the <strong>Properties dialog box</strong>. From here I selected the <strong>Advanced tab</strong> towards the top, and then clicked the <strong>New Driver&#8230;</strong> button.</p>

<div id="attachment_2287" class="wp-caption aligncenter" style="width: 561px"><a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_02.png" rel="lightbox[2118]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_02.png" alt="New Driver" title="ss_win_print_drivers_on_samba_02" width="551" height="521" class="size-full wp-image-2287" /></a><p class="wp-caption-text">New Driver</p></div>

<p>This began the <strong>Add Print Driver Wizard</strong> as seen in the screenshot below. I then clicked the <strong>Next</strong> button.</p>

<div id="attachment_2288" class="wp-caption aligncenter" style="width: 513px"><a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_03.png" rel="lightbox[2118]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_03.png" alt="wizard" title="ss_win_print_drivers_on_samba_03" width="503" height="381" class="size-full wp-image-2288" /></a><p class="wp-caption-text">wizard</p></div>

<p>From here I clicked the <strong>Have Disk&#8230;</strong> button as in this screenshot.</p>

<div id="attachment_2289" class="wp-caption aligncenter" style="width: 512px"><a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_04.png" rel="lightbox[2118]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_04.png" alt="Have Disk" title="ss_win_print_drivers_on_samba_04" width="502" height="384" class="size-full wp-image-2289" /></a><p class="wp-caption-text">Have Disk</p></div>

<p>In the <strong>Install From Disk</strong> dialog I selected the <strong>Browse</strong> button.</p>

<div id="attachment_2290" class="wp-caption aligncenter" style="width: 438px"><a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_05.png" rel="lightbox[2118]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_05.png" alt="browse" title="ss_win_print_drivers_on_samba_05" width="428" height="220" class="size-full wp-image-2290" /></a><p class="wp-caption-text">browse</p></div>

<p>In the <strong>Locate File</strong> dialog, I browsed to the location where I uncompressed the driver files, i.e. <strong>C:\mfc-8480dn\usa</strong>, and clicked the <strong>Open</strong> button.</p>

<div id="attachment_2291" class="wp-caption aligncenter" style="width: 564px"><a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_06.png" rel="lightbox[2118]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_06.png" alt="inf file" title="ss_win_print_drivers_on_samba_06" width="554" height="345" class="size-full wp-image-2291" /></a><p class="wp-caption-text">inf file</p></div>

<p>I was then returned to the <strong>Add Printer Driver Wizard</strong> dialog and presented with a potential list of printers to choose from. Here I chose the <strong><span class="caps">MFC</span>-8480DN Printer</strong>, and clicked the <strong>Next</strong> button.</p>

<div id="attachment_2292" class="wp-caption aligncenter" style="width: 512px"><a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_07.png" rel="lightbox[2118]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_07.png" alt="select printer" title="ss_win_print_drivers_on_samba_07" width="502" height="385" class="size-full wp-image-2292" /></a><p class="wp-caption-text">select printer</p></div>

<p>You should now be back at the <strong>Install From Disk</strong> dialog window. The location of your drivers, <strong>C:\mfc-8480dn\usa</strong> in my case, was displayed in the <strong>Copy manufacturer&#8217;s files from:</strong> field. I then clicked the <strong>OK</strong> button.</p>

<div id="attachment_2293" class="wp-caption aligncenter" style="width: 438px"><a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_08.png" rel="lightbox[2118]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_08.png" alt="Install driver" title="ss_win_print_drivers_on_samba_08" width="428" height="220" class="size-full wp-image-2293" /></a><p class="wp-caption-text">Install driver</p></div>

<p>Finally I was at the end of the <strong>Add Printer Driver Wizard</strong>. I clicked the <strong>Finish</strong> button which began installing the drivers to the <strong>print$</strong> Samba share.</p>

<div id="attachment_2294" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_09.png" rel="lightbox[2118]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_09.png" alt="Copy files" title="ss_win_print_drivers_on_samba_09" width="500" height="385" class="size-full wp-image-2294" /></a><p class="wp-caption-text">Copy files</p></div>

<p>If everything was setup correctly, you should now see the contents of the directory <strong>C:\mfc-8480dn\usa</strong> being copied to the Samba server, i.e. <strong>\\bar\print$\&#8230;</strong>.</p>

<div id="attachment_2295" class="wp-caption aligncenter" style="width: 392px"><a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_10.png" rel="lightbox[2118]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_10.png" alt="transfer dialog" title="ss_win_print_drivers_on_samba_10" width="382" height="163" class="size-full wp-image-2295" /></a><p class="wp-caption-text">transfer dialog</p></div>

<h4>verify the drivers are on print$</h4>

<h5>checking from windows</h5>

<p>To double check that the files were correctly installed, you can login to the Samba server and do an <strong>ls</strong> to see that the files were in fact copied to <strong>print$</strong>. Simply look around in the <strong>/etc/samba/drivers</strong> directory.</p>

<p>Additionally you can see what print drivers are available for a given printer by bringing up a printer&#8217;s <strong>Properties dialog</strong>, and selecting the <strong>Sharing</strong> tab. Once you&#8217;ve got the <strong>Sharing</strong> tab open, click on the <strong>Additional Drivers&#8230;</strong> button.</p>

<div id="attachment_2296" class="wp-caption aligncenter" style="width: 561px"><a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_11.png" rel="lightbox[2118]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_11.png" alt="additional drivers" title="ss_win_print_drivers_on_samba_11" width="551" height="521" class="size-full wp-image-2296" /></a><p class="wp-caption-text">additional drivers</p></div>

<p>In the <strong>Additional Drivers</strong> dialog box, you&#8217;ll see the word <strong>Yes</strong> next to each platform that has a driver available for this particular printer, on the <strong>print$</strong> share. The check mark denotes which driver you&#8217;re printer is using.</p>

<div id="attachment_2297" class="wp-caption aligncenter" style="width: 382px"><a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_12.png" rel="lightbox[2118]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/08/ss_win_print_drivers_on_samba_12.png" alt="available drivers" title="ss_win_print_drivers_on_samba_12" width="372" height="358" class="size-full wp-image-2297" /></a><p class="wp-caption-text">drivers available per platform</p></div>

<h5>checking from linux</h5>

<p>If you have the package <strong>samba-client</strong> under CentOS/RHEL/Fedora installed you should see a program available called <strong>rpcclient</strong>. You can use this program to query a <strong>samba server</strong> to get a <strong>list</strong> of <strong>available drivers</strong>.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p211810"><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code" id="p2118code10"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># rpcclient &lt;samba server&gt; -U root -c &quot;enumdrivers&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">%</span> rpcclient bart <span style="color: #660033;">-U</span> root <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;enumdrivers&quot;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>Windows NT x86<span style="color: #7a0874; font-weight: bold;">&#93;</span>
Printer Driver Info <span style="color: #000000;">1</span>:
	Driver Name: <span style="color: #7a0874; font-weight: bold;">&#91;</span>Brother MFC-8480DN Printer<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></td></tr></table></div>
<div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://www.lamolabs.org/blog/949/remote-installing-centos-5-using-vnc/" rel="bookmark" class="wherego_title">Remote Installing CentOS 5 using VNC</a></li><li><a href="http://www.lamolabs.org/blog/226/how-to-setup-a-mail-server-on-centos-5/" rel="bookmark" class="wherego_title">How to Setup a Mail Server on CentOS 5</a></li><li><a href="http://www.lamolabs.org/blog/2308/one-liner-using-dig-to-mine-useful-dns-info/" rel="bookmark" class="wherego_title">[one-liner]: Using dig to Mine Useful DNS Info</a></li><li><a href="http://www.lamolabs.org/blog/1487/getting-a-brother-mfc-8480dn-printerscannerfax-and-openvz-to-play-nice-on-centos-5/" rel="bookmark" class="wherego_title">Getting a Brother MFC-8480DN Printer/Scanner/Fax and OpenVZ to Play Nice on CentOS 5</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.lamolabs.org/blog/2118/howto-install-windows-print-drivers-onto-a-central-samba-share/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting a Brother MFC-8480DN Printer/Scanner/Fax and OpenVZ to Play Nice on CentOS 5</title>
		<link>http://www.lamolabs.org/blog/1487/getting-a-brother-mfc-8480dn-printerscannerfax-and-openvz-to-play-nice-on-centos-5/</link>
		<comments>http://www.lamolabs.org/blog/1487/getting-a-brother-mfc-8480dn-printerscannerfax-and-openvz-to-play-nice-on-centos-5/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 14:00:48 +0000</pubDate>
		<dc:creator>slmingol</dc:creator>
				<category><![CDATA[tutorials]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[openvz]]></category>
		<category><![CDATA[printing]]></category>
		<category><![CDATA[scanning]]></category>

		<guid isPermaLink="false">http://www.lamolabs.org/blog/?p=1487</guid>
		<description><![CDATA[Background

<p>About a month ago I purchased a MFC aka. an AIO printer/scanner/copier/fax device which was networkable via ethernet. I chose the Brother MFC-8480DN and I&#8217;ve been very pleased with it. It replaced another Brother laser printer, a HL-1440 which I never had a single problem with; but our aging SCSI (yes a SCSI) HP scanner [...]]]></description>
			<content:encoded><![CDATA[<h4>Background</h4>

<p>About a month ago I purchased a <strong><acronym title="Multi-Function Center">MFC</acronym></strong> aka. an <strong><acronym title="All-in-One">AIO</acronym></strong> <strong>printer/scanner/copier/fax</strong> device which was networkable via ethernet. I chose the <strong>Brother <span class="caps">MFC</span>-8480DN</strong> and I&#8217;ve been very pleased with it. It replaced another Brother laser printer, a <strong>HL-1440</strong> which I never had a single problem with; but our aging <strong><span class="caps">SCSI</span></strong> (yes a <span class="caps">SCSI</span>) <strong>HP scanner</strong> had recently given up the ghost. Rather than buy another single purpose scanner, I thought I could consolidate some space in our home office by buying an <strong>All-in-One</strong> device.</p>

<p>I&#8217;ve been extremely satisfied with our choice, except for the lack of drivers available for scanning under Linux. I wasn&#8217;t really overly concerned given this particular device was just released as a new product in <strong>Q1/2009</strong>. My previous <strong>Brother printer</strong>, which I had since <strong>2002</strong>, was supported under Linux from day 1 and looking at the <a href="http://solutions.brother.com/linux/en_us/index.html">Brother website</a>, pretty much <strong>all of their products are too</strong>.</p>

<p>Just to be on the <strong>safe side</strong> I decided to contact <strong>customer support</strong> just to see if one of the existing devices could be substituted in for my model number. I quickly received an email in which the customer rep. said it wasn&#8217;t currently available, but to check back at their website in about 1-2 months and it would be. So I did tonight <strong>(June/2009)</strong> and was pleasantly surprised to find that indeed, <strong>new drivers</strong> were <strong>available</strong> for my device. So I downloaded the <a href="http://solutions.brother.com/linux/en_us/download_scn.html#brscan3">new drivers</a> and installed them into one of my <strong>OpenVZ VEs</strong> as follows.</p>

<p>Before I get started I just wanted to mention that I&#8217;ve really grown to liking <strong>OpenVZ</strong> and have pretty much <strong>converted</strong> most of my <strong><span class="caps">SOHO </span>infrastructure</strong> to using it. It really gives me tremendous <strong>flexibility</strong> in quickly creating <strong>containered instances</strong> of <strong>OSes</strong> so that I can play around with things without trashing any of my existing systems.</p>

<h4>Getting Started</h4>

<p>For this particular setup I already had a devoted instance of <strong>OpenVZ</strong> just for <strong><span class="caps">CUPS</span></strong>, so I opted to use this <strong>VE</strong> to setup both the <strong>printing</strong> and <strong>scanning</strong> capabilities. <strong><span class="caps">NOTE</span>:</strong> In this <strong>howto</strong>, I&#8217;m only going to focus on what Brother calls <strong>Scanning to a file</strong>.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p148716"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code" id="p1487code16"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># requires sane backend</span>
yum <span style="color: #c20cb9; font-weight: bold;">install</span> sane-backends
&nbsp;
<span style="color: #666666; font-style: italic;"># install the brother drivers</span>
rpm <span style="color: #660033;">-ivh</span> <span style="color: #660033;">--nodeps</span> brscan3-0.2.6-1.i386.rpm
&nbsp;
<span style="color: #666666; font-style: italic;"># configure the scanner</span>
brsaneconfig3 <span style="color: #660033;">-a</span> <span style="color: #007800;">name</span>=mfc8480dn <span style="color: #007800;">model</span>=MFC-8480DN <span style="color: #007800;">ip</span>=192.168.1.14
&nbsp;
<span style="color: #666666; font-style: italic;"># setup the server daemon (scans to a file)</span>
brscan-skey-0.2.1-3.i386.rpm</pre></td></tr></table></div>




<h4>Scanning to a File</h4>

<p>This is where there is a small server daemon <strong>(brscan-skey)</strong>, which is able to talk to the <strong>scanner</strong>, and <strong>receive</strong> scanned <strong>files</strong> as either <strong><span class="caps">JPG</span></strong> or <strong><span class="caps">PNG</span></strong> files (I think it supports other formats too). You can launch it like this:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p148717"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code" id="p1487code17"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># brscan-skey's usage</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #000000; font-weight: bold;">%</span> brscan-skey <span style="color: #660033;">-h</span>
USAGE: brscan-skey <span style="color: #7a0874; font-weight: bold;">&#91;</span>option<span style="color: #7a0874; font-weight: bold;">&#93;</span>
This tool enables you to scan a document by using the
Scan key on the Brother MFC through the network.
&nbsp;
 no option     :register all network MFCs
 <span style="color: #660033;">-t</span>            :terminate this tool
 <span style="color: #660033;">-p</span> PASSWD     :<span style="color: #000000; font-weight: bold;">set</span> the password
 <span style="color: #660033;">-u</span> USERNAME   :<span style="color: #000000; font-weight: bold;">set</span> the user name
 <span style="color: #660033;">--diagnosis</span>   :print diagnosis data 
 <span style="color: #660033;">-h</span>            :<span style="color: #7a0874; font-weight: bold;">help</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Here I am starting up the server daemon!</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #000000; font-weight: bold;">%</span> brscan-skey</pre></td></tr></table></div>




<p><strong><span class="caps">NOTE</span>:</strong> Eventually I&#8217;ll want to throw together a start/stop script for <strong>brscan-skey</strong> and incorporate it into this <strong>VE</strong> as a full fledged <strong>service</strong>. For now, every time this system reboots I&#8217;ll have to manually start it!</p>

<h4>Walkthrough</h4>

<p>These <strong>files</strong> are then <strong>stored</strong> on the <strong>system</strong> that is running <strong>brscan-skey</strong>. When this is working I can basically <strong>walk up</strong> to the <strong><span class="caps">MFC</span>-8480DN</strong>, stick a piece of paper on the glass, press the <strong>scan button</strong>, and have the <strong><span class="caps">JPG</span>/PNG file</strong> get automatically <strong>dumped to my server</strong>. </p>


<ul>
<li><b>Initial screen on <span class="caps">MFC</span>-8480DN <span class="caps">LCD </span>after pressing the Scan button</b></li>
</ul>



<div id="attachment_1588" class="wp-caption aligncenter" style="width: 263px;">

<a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/06/ss_mfc8480dn_scan1.png" rel="lightbox[1487]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/06/ss_mfc8480dn_scan1.png" alt="initial LCD" title="ss_mfc8480dn_scan1" width="250" height="169" class="size-full wp-image-1588" /></a>

<p class="wp-caption-text">initial <span class="caps">LCD</span></p>

</div>

<p><span id="more-1487"></span></p>


<ul>
<li><b>Next screen on <span class="caps">MFC</span>-8480DN <span class="caps">LCD, </span>asking which method to use for scanned output</b></li>
</ul>



<div id="attachment_1491" class="wp-caption aligncenter" style="width: 263px"><a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/06/ss_mfc8480dn_scan2.png" rel="lightbox[1487]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/06/ss_mfc8480dn_scan2.png" alt="screenshot of selecting where to send a scan" title="ss_mfc8480dn_scan2" width="253" height="169" class="size-full wp-image-1491" /></a><p class="wp-caption-text">screenshot of selecting where to send a scan</p></div>


<ul>
<li><b>Final screen asking which system on the network to direct the scanned file to</b></li>
</ul>



<div id="attachment_1492" class="wp-caption aligncenter" style="width: 262px"><a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/06/ss_mfc8480dn_scan3.png" rel="lightbox[1487]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/06/ss_mfc8480dn_scan3.png" alt="screenshot of which computer to save the scan to" title="ss_mfc8480dn_scan3" width="252" height="169" class="size-full wp-image-1492" /></a><p class="wp-caption-text">screenshot of which computer to save the scan to</p></div>

<h4>brscan-skey Output</h4>

<p>The daemon <strong>brscan-skey</strong> will put the <strong>files</strong> into a <strong>directory</strong> like so:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p148718"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p1487code18"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># console chatter from brscan-skey</span>
scan from mfc8480dn<span style="color: #7a0874; font-weight: bold;">&#40;</span>brother3:net1;dev0<span style="color: #7a0874; font-weight: bold;">&#41;</span> to <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>brscan<span style="color: #000000; font-weight: bold;">/</span>brscan.Pj8088
scanimage: rounded value of br-x from <span style="color: #000000;">215.9</span> to <span style="color: #000000;">215.88</span>
scanimage: rounded value of br-y from <span style="color: #000000;">355.6</span> to <span style="color: #000000;">355.567</span></pre></td></tr></table></div>




<h4>Windows vs. Linux Differences</h4>

<p>Notice that the files are getting dumped into the directory <strong>/root/brscan/</strong>. This is because I started <strong>brscan-skey</strong> as <strong>root</strong>. Also this is why in the <strong>3rd screenshot</strong>, the choice is <strong>root</strong>. The other <strong>2 choices</strong> in this <strong>screenshot</strong> are <strong>windows PCs</strong> whose names are <strong>mrx</strong> and <strong>scully</strong>. This is one <strong>minor difference</strong> between the <strong>PC</strong> version of this software and the <strong>Linux</strong> version. Not a huge difference but something to consider. Eventually I will go through the <strong>Brother scripts</strong> located under <strong>/usr/local/Brother</strong>, to see if I can change/override the name that is being passed to the scanner, but I&#8217;m going to leave that for another day.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p148719"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code" id="p1487code19"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># ...here...</span>
<span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>Brother<span style="color: #000000; font-weight: bold;">/</span>
cupswrapper  fax  filter  inf  lpd  sane
<span style="color: #666666; font-style: italic;"># ...and here...</span>
<span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>Brother<span style="color: #000000; font-weight: bold;">/</span>sane<span style="color: #000000; font-weight: bold;">/</span>
Brsane3.ini           brscan_mail.config      brscan-skey-0.2.1-3.cfg  setupSaneScan3
brsaneconfig3         brscan_mailmessage.txt  brscan-skey-0.2.1-3.sh
brsanenetdevice3.cfg  brscan-skey-0.2.1-<span style="color: #000000;">3</span>     script</pre></td></tr></table></div>




<h4>Printing</h4>

<p>Now given the <strong><span class="caps">MFC</span>-8480DN</strong> is just a <strong>standard laser printer</strong> I was able to find a <strong>suitable driver</strong> that allowed me to initially do <strong>basic printing</strong> from <strong><span class="caps">CUPS</span></strong>, so I didn&#8217;t bother waiting for the true native <span class="caps">CUPS </span>driver to be released from Brother. </p>

<p>Once a native driver did become available I took the opportunity to install it as well. First off I needed to install some <span class="caps">RPM</span>s.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p148720"><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code" id="p1487code20"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># CUPS wrappers</span>
rpm <span style="color: #660033;">-ihv</span> <span style="color: #660033;">--nodeps</span> cupswrapperMFC8480DN-2.0.3-1.i386.rpm
&nbsp;
<span style="color: #666666; font-style: italic;"># mfc8480dn driver</span>
rpm <span style="color: #660033;">-ivh</span> <span style="color: #660033;">--nodeps</span> mfc8480dnlpr-2.0.3-1.i386.rpm</pre></td></tr></table></div>




<h4><span class="caps">CUPS</span></h4>

<p>Once these were installed I went through the <strong>web interface</strong> of <strong><span class="caps">CUPS</span></strong>, and modified my <strong>existing printer setup</strong> to use these <strong>new drivers</strong>. The interface is usually located at <strong>port 631</strong> of the <strong><span class="caps">CUPS </span>server</strong>.</p>

<p>Here are some screenshots of how I went about re-configuring the <span class="caps">MFC</span>-8480DN printer in <span class="caps">CUPS.</span></p>


<ul>
<li><b>Initial screen in <span class="caps">CUPS&#8217; </span>web interface, showing the existing printer</b></li>
</ul>



<div id="attachment_1555" class="wp-caption aligncenter" style="width: 660px"><a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/06/ss_mfc8480dn_printer11.png" rel="lightbox[1487]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/06/ss_mfc8480dn_printer11-650x276.png" alt="select printer model (driver)" title="ss_mfc8480dn_printer1" width="650" height="276" class="size-medium wp-image-1555" /></a><p class="wp-caption-text">select printer model (driver)</p></div>


<ul>
<li><b>Next screen after clicking &#8220;modify printer&#8221;</b></li>
</ul>



<div id="attachment_1516" class="wp-caption aligncenter" style="width: 658px"><a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/06/ss_mfc8480dn_printer2.png" rel="lightbox[1487]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/06/ss_mfc8480dn_printer2.png" alt="MFC-8480DN&amp;#039;s location &amp; description" title="ss_mfc8480dn_printer2" width="648" height="278" class="size-full wp-image-1516" /></a><p class="wp-caption-text">MFC-8480DN's location &amp; description</p></div>


<ul>
<li><b>Select the <span class="caps">IPP</span> Protocol for communication between cups and the printer</b></li>
</ul>



<div id="attachment_1517" class="wp-caption aligncenter" style="width: 661px"><a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/06/ss_mfc8480dn_printer3.png" rel="lightbox[1487]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/06/ss_mfc8480dn_printer3.png" alt="select which protocol to use to communicate with networked printer" title="ss_mfc8480dn_printer3" width="651" height="183" class="size-full wp-image-1517" /></a><p class="wp-caption-text">select which protocol to use to communicate with networked printer</p></div>


<ul>
<li><b>Specify the device <span class="caps">URI</span></b></li>
</ul>



<div id="attachment_1588" class="wp-caption aligncenter" style="width: 658px;">

<a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/06/ss_mfc8480dn_printer42.png" rel="lightbox[1487]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/06/ss_mfc8480dn_printer42-650x316.png" alt="device URI" title="ss_mfc8480dn_printer4" width="650" height="316" class="size-medium wp-image-1569" /></a>

<p class="wp-caption-text">device <span class="caps">URI</span></p>

</div>


<ul>
<li><b>Select the Maker</b></li>
</ul>



<div id="attachment_1519" class="wp-caption aligncenter" style="width: 638px"><a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/06/ss_mfc8480dn_printer5.png" rel="lightbox[1487]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/06/ss_mfc8480dn_printer5.png" alt="select printer make/manufacturer" title="ss_mfc8480dn_printer5" width="628" height="388" class="size-full wp-image-1519" /></a><p class="wp-caption-text">select printer make/manufacturer</p></div>


<ul>
<li><b>Select the Model</b></li>
</ul>



<div id="attachment_1520" class="wp-caption aligncenter" style="width: 660px"><a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/06/ss_mfc8480dn_printer6.png" rel="lightbox[1487]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/06/ss_mfc8480dn_printer6-650x306.png" alt="select printer model (driver)" title="ss_mfc8480dn_printer6" width="650" height="306" class="size-medium wp-image-1520" /></a><p class="wp-caption-text">select printer model (driver)</p></div>

<p>Click the modify button and you&#8217;re all set. The final piece to all this is setting up the fax. But this is already a really long post, so I&#8217;m going to leave that for another day too.</p><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://www.lamolabs.org/blog/3520/one-liner-using-yum-to-download-rpms-under-fedora-centos-rhel/" rel="bookmark" class="wherego_title">[one-liner]: Using Yum to Download RPMs under Fedora, CentOS, and RHEL</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.lamolabs.org/blog/1487/getting-a-brother-mfc-8480dn-printerscannerfax-and-openvz-to-play-nice-on-centos-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up a linux workstation to use a centrally managed CUPS installation</title>
		<link>http://www.lamolabs.org/blog/628/setting-up-a-linux-workstation-to-use-a-centrally-managed-cups-installation/</link>
		<comments>http://www.lamolabs.org/blog/628/setting-up-a-linux-workstation-to-use-a-centrally-managed-cups-installation/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 18:40:43 +0000</pubDate>
		<dc:creator>slmingol</dc:creator>
				<category><![CDATA[tips & tricks]]></category>
		<category><![CDATA[cups]]></category>
		<category><![CDATA[printing]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://www.lamolabs.org/blog/628/628/</guid>
		<description><![CDATA[<p>I always forget to do this every time I setup a new client in my network so I&#8217;m writing it down here. I have a print server in my intranet and use CUPS to share my printers out to my linux and windows machines. The mis-config shows up like this to start:</p>


1
2
% lpq
lpq: error - [...]]]></description>
			<content:encoded><![CDATA[<p>I always forget to do this every time I setup a new client in my network so I&#8217;m writing it down here. I have a <strong>print server</strong> in my intranet and use <strong><span class="caps">CUPS</span></strong> to share my printers out to my <strong>linux</strong> and <strong>windows</strong> machines. The mis-config shows up like this to start:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p62824"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p628code24"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> lpq
lpq: error - no default destination available.</pre></td></tr></table></div>




<p>It usually takes a couple of minutes to remember/figure out what I&#8217;m doing wrong here. Then it dawns on me that I need to modify the <strong>client.conf</strong> file. In order to get a client machine running <strong><span class="caps">CUPS</span></strong> to know about a print server I have to modify its client.conf file.</p>

<p>Add this to the file, <strong>/etc/cups/client.conf</strong>  which is usually empty to start:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p62825"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p628code25"><pre class="ini" style="font-family:monospace;">ServerName print.bubba.net</pre></td></tr></table></div>




<p>Restart cups and you should be all set.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p62826"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p628code26"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>cups reload</pre></td></tr></table></div>
<div id="wherego_related"> </div>]]></content:encoded>
			<wfw:commentRss>http://www.lamolabs.org/blog/628/setting-up-a-linux-workstation-to-use-a-centrally-managed-cups-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
