Difference between revisions of "Brother HL-2040"

From ArchWiki
Jump to: navigation, search
(New page: Category:Printers_(English) Category:Tutorials (English) =Summary= This guide explains how to install a Brother HL-2040 laserjet printer using CUPS. '''''Note:''''' ''If you alr...)
 
Line 14: Line 14:
 
=Download Brother HL-2040 drivers=
 
=Download Brother HL-2040 drivers=
  
Create a temp directory such as '''mkdir ~/brother''' to work in
+
Create a temp directory such as '''/home/username/brother'''
  
 
Download the RPM packages of the LPR driver ([http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/lpr_others/brhl2040lpr-2.0.1-1.i386.rpm HERE]) and the CUPS wrapper ([http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/cups_wrapper/cupswrapperHL2040-2.0.1-1.i386.rpm HERE]) and place them into your newly created temp dir
 
Download the RPM packages of the LPR driver ([http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/lpr_others/brhl2040lpr-2.0.1-1.i386.rpm HERE]) and the CUPS wrapper ([http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/cups_wrapper/cupswrapperHL2040-2.0.1-1.i386.rpm HERE]) and place them into your newly created temp dir

Revision as of 01:15, 27 May 2007


Summary

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.

Prerequisites

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

Download the RPM packages of the LPR driver (HERE) and the CUPS wrapper (HERE) and place them into your newly created temp dir


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 create the temp directory brother in your home directory as mentioned above. Use your favorite text editor (i.e. kate, gedit, or vi) and open

/home/username/brother/usr/local/Brother/cupswrapper/cupswrapperHL2040-2.0

Replace all instances of /etc/init.d/ with /etc/rc.d/ Save and close

Next, edit:

/home/username/brother/usr/local/Brother/inf/setupPrintcap

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

It will stop the cups daemon if it's running, and restart it. Now browse to the CUPS server : http://localhost:631/ In the Administration category, choose Manage printers. You should see your HL2040 printer automatically installed and configured.

You can verify this by printing a test page

Comments

Personally, I have that under KDE (3.5.7) the printer driver does not align the page margins properly. The print appears lower on the page than it should be, causing some text to scroll off the bottom. If anyone knows of a workaround for this, please post it here. Thanks!