Brother HL-2270DW on SlackwarePosted by: Andrew Smith
Poster contact info: asmith16 at littlesvr.ca
Author: same as 'Posted by'
Software: Slackware 13.37
I got this printer because I have another Brother (MFC7860DW) which worked perfectly on Slackware, and amazingly for the price it can do double-sided printing.
But setting it up took a lot of perservering. It took me until 3AM one night to figure out the one-line change required to make the printer work. Hopefully that will save you a lot of time.
First of all - this is not really a postscript printer. I did manage to get it to sort of work using the generic PCL (or was it PCL5) Printer driver but it didn't work very well. Worst of all - firefox would print webpages with black and white reversed, i must have wasted 10% of my toner running those tests :)
Secondly - my setup is on a wired network. I'm sure USB and wifi work just fine, but I didn't have a reason to try them so I can't give instructions for that. (though USB should be a pice of cake).
Download the rpm versions of the "LPR driver" and the "cupswrapper driver" packages from brother.com. Do all the following steps as root.
Convert these to tgz packages by using rpm2tgz.
Install the resulting two slackware packages using installpkg.
Run this command: /usr/local/Brother/Printer/HL2270DW/cupswrapper/cupswrapperHL2270DW-2.0.4 and then the printer will show up in the CUPS list of Brother printer drivers. This probably gets run automatically when you use the RPM but that gets lost in the tgz conversion.
Now the driver will be available to be selected in the CUPS add printer dialog, but it's not ready yet! If you try to use it now - it will just print many pages of postscript garbage for every single page you try to print. To make matters more strange - some things (like the CUPS test page) print perfectly.
Step2: Modify driver
Not to worry, I figured it out for you and the solution is simple. Just edit the file
FILE_TYPE=`file $INPUT_TEMP1 | sed -e 's/^.*:[ ]*//' -e 's/[ ].*//'` # a.k. Hack until the "file" command gets fixed if [ `head -1 $INPUT_TEMP1 | grep "%!PS"` ] ; then FILE_TYPE="PostScript" fi #if [ "$FILE_TYPE" = "PostScript" -o "$FILE_TYPE" = "PDF" ] ; thenNow if you already did the cups add printer thing - your printer will work. Or you can now add the printer to cups, and it will work.
Woo! And if I ever find the person who maintains the 'file' package - I'm strangling him with my bare hands.