Sunday 13 May 2007

Configuring Brother Multifunction printer MFC-5440CN for Open Office and Firefox on PCLinuxOS

This entry explains how to install the multifunction printer Brother MFC-5440CN on PCLinuxOS to work in an integrated way with Firefox and Open Office with all its functions, that is Network printing, print to FAX and scanner.

The instructions are probably valid with small modifications for other Linux distros. Also the intructions are probably valid for other Brother multifunction printers by just downloading the correct drivers for your printer from the Brother website support for Linux.

We are going to download all the drivers first and then install them.


  1. Go to webpage http://solutions.brother.com/linux/en_us/index.html

  2. Click on “click here” besides the “LPR Printer driver”

  3. Click on “Please be sure to install the LPR driver”

  4. Search for printer MFC-5440CN (or whatever other Brother model you have) and click on the “Download” button on the second column (for Mandriva)

  5. Accept the legal stuff (don't know what it says! :-) ) and save the file (to the Desktop for example)

  6. Go back two webpages (i.e. to the “Brother CUPS driver”

  7. Click on “Drivers for Red Hat / Madriva (Mandrake) / SuSE

  8. Search for printer MFC-5440CN (or whatever other Brother model you have) and click on the “Download” button on the second column (for Mandriva)

  9. Accept the legal stuff (don't know what it says! :-) ) and save the file (to the Desktop for example)

  10. So go back to the URL in point 1 and click on “click here” esides where it says “SANE Scanner Driver”

  11. Choose the brscan or the brscan2 driver depending on your printer (list of models is there). For MFC-5440CN the driver is brscan2

  12. On the table for Red Hat / Mandriva ... download the driver brscan2 for 32bit version. Accept legal and save.

  13. Go back to the webpage in point 1.

  14. Click on the “Click here” besides the “LPR PC-FAX send driver”

  15. Download the driver for Mandriva

  16. Go back to the webpage in point 1.

  17. Click on the “Click here” besides the “CUPS Wrapper PC-FAX send”

  18. Download the RPM installer package

  19. Go to the URL in step 1 and leave it openend, we will need it later


Installation of the Drivers


  1. Installing the LPR Driver (need for the subsequent CUPS wrapper)

    1. open a terminal as root (or open a normal one and issue a “su”)

    2. Go to the folder where you stored the drivers. If you left them in Desktop they will be in /home//Desktop, if you are root, they will be on /root/Desktop.

    3. type
      rpm -ihv –nodeps MFC5440CNlpr-1.0.2-1.i386.rpm
      (or what ever driver is for your printer)

    4. Leave the terminal window open, we will need it later.

  2. Installing the CUPS wrapper

    1. type
      apt-get install tcsh
      type “y” to confirm the installation
      This is very important because the rpm package has a script that needs csh which is not default in PCLinuxOS. To run a csh script you can use tcsh that is csh compatible (extension).

    2. Now we need to fix an error in the PCLinuxOS tcsh. Type
      vi /etc/profile.d/10pclinuxos-release.csh
      (or use your favourite editor)
      Then change the line “setenv META_CLASS $META_CLASS” to “setenv METACLASS”

    3. type
      rpm -ihv --nodeps cupswrapperMFC5440CN-1.0.0-1.i386.rpm

    4. If it gives you an error sayin “already installed” then type
      rpm -ihv --nodeps –force cupswrapperMFC5440CN-1.0.0-1.i386.rpm
      You might get this error if you tried to install this package before you found this tutorial :-)

    5. In your web browser open “http://localhost:631” (the CUPS web interface)

    6. Click on “Printers”, then on “Modify Printer” on the MFC5440CN printer

    7. Optionally indicate location, click “Continue”

    8. Select device “Brother MFC-5440CN xxx.xxx.xxx.xxx (Brother MFC-5440CN) where xxx.xxx.xxx.xxx is the actual IP address assigned to your printer. Then click contiue.

    9. Select Make “Brother” and click “Continue”

    10. Select Model “Brother MFC-5440CN CUPS v1.1 (en) and click on “Modify Printer”

    11. In a few seconds the page will reload. Click on “Print Test Page”. If you have followed all the steps it will print!


  1. Installing the SANE drivers

    1. Go back to your root terminal and type exit if you where still on tcsh (that is, if you left the terminal as it was from the previous step).

    2. make sure that you have the latest version of xsane by typing
      apt-get install xsane
      and installing it if necessary

    3. type
      rpm -ivh brscan2-0.2.3-0.i386.rpm

    4. type
      brsaneconfig2 -a name=BRD_SCANNER model=MFC-5440CN ip=xxx.xxx.xxx.xxx
      where xxx.xxx.xxx.xxx is the ip address of your printer that you can double check on http://localhost:631 if you do not remember.

      Be careful that the model has be typed exactly as above (or whatever model you have typed with the same “notation”).

    5. You can check that the configuration is right by typing:
      brsaneconfig2 -q
      and you sould see something like
      0 BRD_SCANNER “MFC-5440CN” I:xxx.xxx.xxx.xxx

    6. You can try also that it works with the application xsane tha is on “Start->Multimedia->Graphics->Xsane”. If you press SCAN it should start directly to scan without needing to configure anything else!

  2. Installing the LPR FAX drivers

    1. In the root terminal type
      rpm -ivh --nodeps brmfcfaxlpd-1.0.0-1.i386.rpm

  3. Installing the CUPS Wrapper for PC-FAX

    1. In the root terminal type
      rpm -ivh --nodeps brmfcfaxcups-1.0.0-1.i386.rpm

    2. Now you will see in the CUPS webpage the printer BRFAX

    3. Click on “Modify Printer” for the BRPFAX

    4. Click on “Continue”

    5. Select the Device “Brother MFC-5440CN xxx.xxx.xxx.xxx (Brother MFC-5440CN) click continue

    6. Select the Make “Brother” click continue

    7. Select Model “Brother BRMFCFAX for CUPS (en)”

    8. click on “Modify Printer”



  4. Configuring printing to FAX

    1. This is unfortunatelly not that easy as it should be. It is not possible to print directly to the BRFAX

    2. To configure printing from firefox do he following

      1. Go to File->Print

      2. select the printer PostScript/default

      3. select properties

      4. In the “print command” replace “lpr” to brpcfax. This is only needed the first time.

      5. Now you can print to fax clicking on “Print”. This is the only step you will need when you want to print again (and selecting the PostScript/default if it is not already)

      6. This will display a java dialog to enter he number to dial. Enter and click on Send. It should send the fax!

      7. If you have trouble printing to fax it may be because brpcfax needs root permisions and you are with another account. If this happens then modify the command for the postscript/default to “sudo brpcfax”. You will also need to add your user to the sudo list for this command (not included in this tutorial but google for sudo and you will see that it is easy, if i have more time I'll include it here)

    3. To configure printing from Open Office you need to do

      1. You need to run spadmin doing from the termina window (may be there is a way to open it from the Desktop, but I didn't try):

        cd /usr/lib/ooo-2.2/program
        ./spaminsp

        This will open a window with the Printer Administration for Open Office.

      2. Click on “New Printer”

      3. Leave selected the default option “Connect a fax device” and click on Next

      4. Leave selected the option “The default printer” and click next

      5. Now enter the following command
        brpcfax -P BRFAX -o Paper=A4 fax-number=(PHONE) (TMP)
        and Next

      6. Now you can set the name of the fax printer for OO, you can leave the default name Fax printer.

      7. Click on Finish and the Close

Now the fax is configured to be used from Open Office, to test it open OOWriter type something and the Print to “Fax Printer” (or whatever name you gave it in step 6 above). Once you print, a new window will appear requesting the fax number, enter it and click on OK. Your MFC should then start dialing!


If it does not work you might need to add to the command in spadmin a “sudo “ before the brpcfax. You will also need to give permitions to your user to execute with sude the command brpcfax (not covered here but easy to find in google).

I hope that this article has been useful I would like to hear your comments...

12 comments:

Anonymous said...

Tried to install the printer driver by the method described, but although fixing the error in the PCLinuxOS tcsh and changing the relevant line I get an error message "META_CLASS: Undefined variable" and the CUPS Wrapper driver is not installed.
Please, could someone help!

Anonymous said...

You have to change /etc/profile.d/10pclinuxos-release.csh, but ALSO /etc/profile.d/10mandriva-release.csh !!!
And not to “setenv METACLASS” but “setenv META_CLASS” in both files!
After that rpm -ihv --nodeps –force cupswrapperMFC5440CN-1.0.0-1.i386.rpm

It works for me very well; I had the same problem as you.

Anonymous said...

Il works with Brother DCP 340 CW as well.
Thanks to your suggestion I installed my printer on PCLinuxOs too.
Thanks again.

Anonymous said...

The printer and scanner worked for MFC-3820CN. I used the PCLinuxOS Control center to add the printer,
Thanks

Anonymous said...

this is great!!! a few typos here and there, but the above comments correct the issues. works with MFC-420CN, obviously by substituting the correct drivers. Thanks again!!!

Unknown said...

Brilliant!!! I have a Brother MFC-3820CN and this worked for me on pclinuxos 2007 and 2009.1. I also got the error "META_CLASS: Undefined variable" after correctly changing the line for tcsh in the 2 files but restarting the terminal fixed that. I also used your USB fstab line in a bash rsync backup programme to mount USB 1TB drives read/write

Anonymous said...

You are awesome!!!
Been messing with it all day until I found this tutorial. I added a link to your tutorial in my forum thread too in case anyone else ever has the same issues.

Thanks a million! Everything works!

Anonymous said...

I needed another -o before the fax-number option to get it working with OpenOffice (oowriter) 3.2.1.

From poking around, the entry gets stored in ~/.ooo3/user/psprint/psprint.conf

Command=brpcfax -P BRFAX -o Paper=A4 -o fax-number=(PHONE) (TMP)

In testing, using a long distance carrier prefix works fine, but it doesn't seem to like expanding the international access sign, so best dial 0033 instead of +33 etc.

Anonymous said...

It doesn't worked on Debian 64 bit. You need additional a few symlinks I found in Archlinux Wiki

sarabose said...

Thanks a lot for the much needed info!
Brother mfc 5440cn driver

Anonymous said...

Was trying to install my MFC-J825DW on PCLOS LXDE Lite, configured to my taste. Bought the printer because of good reports and vendor support for Linux. Plus I don't print much. Anyway, finished the first installation, test page and ... Nope. ... Okay, okay, this is Linux. Just have to find whatever little kluge that no one documented.

In this case, I had deleted tcsh (never use it) and wouldn't have guessed at the META_CLASS fix.

And voila! Printer works now, and only ONE session of google-fu. I salute you, sir.

nitinrai.com said...

Nice blog i have searched here,Thanks for share with us anice piece of information.
Brother Multifunktionsdrucker