Install Brother HL-2140 on Arch Linux

I bought Brother HL-2140 laser printer months ago and that time it was automatically configured in Ubuntu Hardy. Since I replaced my system with Archlinux, I had to reinstall the driver. Today I tried to install the driver, following the article “Brother HL-2040” on archwiki.

The instructions are almost the same, as well as the drivers. I tried the official 2.0.2-1 driver which is for HL-2140, however, not working. Instead, the driver for HL-2040, which version is 2.0.1-1 works fine for me.

Here is the instructions.

  1. install cups first

    > pacman -S cups
    > pacman -S lib32-libcups (if you’re using x86-64

  2. downlaod the rpm packages of lpr driver and the cups wrapper
  3. extract rpm files

    > brhl2040lpr-2.0.1-1.i386.rpm
    > cupswrapperHL2040-2.0.1-1.i386.rpm

    if u do not have rpmextract,

    > pacman -S rpmextract

  4. replace all instances of /etc/init.d/ with /etc/rc.d/ in ./usr/local/Brother/cupswrapper/cupswrapperHL2040-2.0.1
  5. replace all instances of /etc/printcap.local with /etc/printcap in ./usr/local/Brother/inf/setupPrintcap
  6. copy ./usr/ and ./var/ (these are extracted from rpm files and already modified in step #4,5) to /usr/ and /var/ respectively
  7. run the script to complete installation, it would aumatically restart cups server

    > /usr/local/Brother/cupswrapper/cupswrapperHL2040-2.0.1

  8. finally, u can go to cups server http://localhost:631/ to have a test page as u like.

ps, if you meet some problem with cups error, you may refer to this post (link)