- 1 Summary
- 2 Prerequisites
- 3 Download Brother HL-2040 drivers
- 4 Extracting the RPM files
- 5 Editing files to make them work with Arch
- 6 Installing the driver and printer
- 7 Regional Settings
- 8 Alternate Method for KDE Users
This guide explains how to install a Brother HL-2040 laserjet printer using CUPS.
Note: If you already attempted (and failed) to install the driver in CUPS, remove it before proceeding with this tutorial.
This tutorial assumes you have already configured the CUPS (CUPS_Setup) printer server. There is plenty of existing information to get this working.
Download Brother HL-2040 drivers
Create a temp directory such as /home/username/brother
Extracting the RPM files
You'll need to grab a script to extract the files from the RPM packages, so log in as root and execute:
# pacman -S rpmextract
Then extract both RPM files:
$ rpmextract.sh brhl2040lpr-2.0.1-1.i386.rpm $ rpmextract.sh cupswrapperHL2040-2.0.1-1.i386.rpm
You should now have two sub-directories: usr and var
Editing files to make them work with Arch
Arch Linux uses its own filesystem hierarchy, so you must edit some files to match it. We'll assume you created the temp directory brother in your home directory as mentioned earlier. Use your favorite text editor (i.e. kate, gedit, or vi) and open
Replace all instances of /etc/init.d/ with /etc/rc.d/ Save and close
Replace all instances of /etc/printcap.local with /etc/printcap Save and close
Now we're ready to copy the files to their respective places on our system (you'll need to be root for this)
# cp -r /home/username/brother/usr/* /usr # cp -r /home/username/brother/var/* /var
Installing the driver and printer
Now let's run the installation script (again, as root):
# cd /usr/local/Brother/cupswrapper/ # ./cupswrapperHL2040-2.0.1
Upon completion the script will attempt to restart the CUPS daemon if it was running. Now browse to the CUPS server : http://localhost:631/
Under the Administration category, choose Manage printers. You should now see your HL2040 printer automatically installed and configured.
Print a test page and configure the printer settings to your liking.
Make sure to set your printer preferences to match your region. For example, if you live in North America (Canada, US, Mexico) your paper size should be changed from the Default "A4" to "Letter". Sometimes this will be done automatically by your Desktop Environment (e.g. KDE) but it's worthwhile to check it yourself or the text on your pages won't align properly.
Alternate Method for KDE Users
This document assumes that you are: 1. Using KDE 2. Your printer is connected on LPT1 - parallel port.
Install Required Packages
pacman -S cups foomatic-db foomatic-db-engine foomatic-db-ppd foomatic-filters
You will want to edit the /etc/rc.conf file to start cups on every reboot. Add cups to the daemon list.
K menu -> settings -> printers
Click administrator mode
Enter root password
Click "add printer"
Choose local (top one)
The port should be lpt1
Click it... then next
Then the hlwerfjefja one we all know and love HL-2400CeN hl1250
Click next then test
Set dpi to 600, test again.
no banners... no quota... denied users...
Give it a name
You should be done