Difference between revisions of "Brother HL-2250DN"

From ArchWiki
Jump to: navigation, search
(Created page with "Category:Printers =Summary= This guide explains how to install a Brother HL-2250ND laserjet printer using CUPS. '''''Note:''''' ''If you already attempted (and failed) ...")
 
m (Download Brother HL-2250ND drivers)
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
[[Category:Printers]]
 
[[Category:Printers]]
 +
This guide explains how to install a Brother HL-2250DN laserjet printer using CUPS.
  
=Summary=
+
{{Note|If you already attempted (and failed) to install the driver in CUPS, remove it before proceeding with this tutorial.}}
  
This guide explains how to install a Brother HL-2250ND laserjet printer using CUPS.
+
==Prerequisites==
  
'''''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]] printer server.  There is plenty of existing information to get this working.
  
=Prerequisites=
+
==Installation==
 +
To install the printer you have two options:  Manually or from an AUR package.
  
This tutorial assumes you have already configured the [[CUPS]] printer server.  There is plenty of existing information to get this working.
+
===Installing from AUR===
 +
The AUR package [https://aur.archlinux.org/packages/brother-hl2250dn/ brother-hl2250dn] adds support for the Brother HL-2250DN printer.
  
=Download Brother HL-2250ND drivers=
+
This package basically does all that the manual installation requires you to do, but it ensures that all dependencies (eg. a2ps, cups and lib32-glibc if you are on a x86_64 system) are installed and that the driver files are managed by the package system.
  
Create a temp directory such as '''/home/username/brother'''
+
For full information on installing packages from AUR, refer to the [[AUR]] section.
  
Download the RPM packages of the CUPS wrapper ([http://www.brother.com/pub/bsc/linux/dlf/cupswrapperHL2250DN-2.0.4-2.i386.rpm HERE]) and the LPR driver ([http://www.brother.com/pub/bsc/linux/dlf/hl2250dnlpr-2.1.0-1.i386.rpm HERE]) and place them into your newly created temp dir
+
====Building the AUR package====
 +
To install the printer driver, use the following steps:
  
 +
# Acquire the tarball which contains the [[PKGBUILD]] and the patches from [https://aur.archlinux.org/packages/brother-hl2250dn this page]
 +
# Extract the tarball (preferably in a folder set aside just for builds from the AUR) with {{ic|tar -xzf brother-hl2250dn.tar.gz}}.
 +
# Run {{ic|makepkg}} in the directory where the files are saved ({{ic|makepkg -s}} will automatically resolve dependencies with pacman). This will download the code, compile it and pack it.
 +
# Install the resulting package with [[pacman]]:
 +
 +
: {{bc|# pacman -U /path/to/brother-hl2250dn-version-number.tar.xz}}
 +
 +
After installation of the package, you can proceed to configure the printer as described on [http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/instruction_prn1a.html on this page].  Follow step 5a for USB connection, and step 5b for a networked printer.
 +
 +
 +
===Installing manually===
 +
 +
====Download Brother HL-2250DN drivers====
 +
 +
Create a temp directory such as {{ic|~/brother}}
 +
 +
Download the RPM packages of the CUPS wrapper ([http://www.brother.com/pub/bsc/linux/dlf/cupswrapperHL2250DN-2.0.4-2.i386.rpm HERE]) and the LPR driver ([http://www.brother.com/pub/bsc/linux/dlf/hl2250dnlpr-2.1.0-1.i386.rpm HERE]) and place them into your newly created temp dir
  
=Extracting the RPM files=
+
====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:
 
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
 
  # pacman -S rpmextract
Line 25: Line 46:
 
You should now have two sub-directories: ''usr'' and ''var''
 
You should now have two sub-directories: ''usr'' and ''var''
  
=Editing files to make them work with Arch=
+
====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 <em>brother</em> in your home directory as mentioned earlier.
 
Arch Linux uses its own filesystem hierarchy, so you must edit some files to match it. We'll assume you created the temp directory <em>brother</em> in your home directory as mentioned earlier.
 
Use your favorite text editor (i.e. kate, gedit, or vi) and open
 
Use your favorite text editor (i.e. kate, gedit, or vi) and open
 
  /home/username/brother/usr/local/Brother/Printer/HL2250DN/cupswrapper/cupswrapperHL2250DN-2.0.4
 
  /home/username/brother/usr/local/Brother/Printer/HL2250DN/cupswrapper/cupswrapperHL2250DN-2.0.4
Replace all instances of '''''/etc/init.d/''''' with '''''/etc/rc.d/'''''
+
Replace all instances of {{ic|/etc/init.d/}} with {{ic|/etc/rc.d/}}
 
Save and close
 
Save and close
  
 
Next, edit:
 
Next, edit:
 
  /home/username/brother/usr/local/Brother/Printer/HL2250DN/inf/setupPrintcap2
 
  /home/username/brother/usr/local/Brother/Printer/HL2250DN/inf/setupPrintcap2
Replace all instances of '''''/etc/printcap.local''''' with '''''/etc/printcap'''''
+
Replace all instances of {{ic|/etc/printcap.local}} with {{ic|/etc/printcap}}
 
Save and close
 
Save and close
  
Line 41: Line 62:
 
  # cp -r /home/username/brother/var/* /var
 
  # cp -r /home/username/brother/var/* /var
  
=Installing the driver and printer=
+
====Installing the driver and printer====
 
Now let's run the installation script (again, as root):
 
Now let's run the installation script (again, as root):
 
  # cd /usr/local/Brother/Printer/HL2250DN/cupswrapper/
 
  # cd /usr/local/Brother/Printer/HL2250DN/cupswrapper/
Line 48: Line 69:
 
Now browse to the CUPS server : http://localhost:631/
 
Now browse to the CUPS server : http://localhost:631/
  
Under the Administration category, choose Manage printers. You should now see your HL2040 printer <b>automatically</b> installed and configured, for USB connection.
+
Under the Administration category, choose Manage printers. You should now see your HL2250DN printer <b>automatically</b> installed and configured, for '''USB connection'''.
  
Read [http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/instruction_prn1a.html here, and follow step 5a for an USB connection, and step 5b for a network connection.
+
====Configuring the connection====
 +
Follow step 5a for USB connection, and step 5b for a network connection, [http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/instruction_prn1a.html on this page].
  
 
Print a test page and configure the printer settings to your liking.
 
Print a test page and configure the printer settings to your liking.
  
==Edit /etc/rc.conf==
+
====Auto start====
 
You will want to edit the /etc/rc.conf file to start cups on every reboot.
 
You will want to edit the /etc/rc.conf file to start cups on every reboot.
 
Add '''cupsd''' to the daemon list.
 
Add '''cupsd''' to the daemon list.
  
=Regional Settings=
+
====Regional Settings====
 
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.
 
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.
 +
 +
====Alternative Options====
 +
I failed to get the above to work for various reasons, but am having moderate success with the Generic PCL Laser Printer driver over IPP.

Revision as of 09:21, 26 June 2013

This guide explains how to install a Brother HL-2250DN 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 printer server. There is plenty of existing information to get this working.

Installation

To install the printer you have two options: Manually or from an AUR package.

Installing from AUR

The AUR package brother-hl2250dn adds support for the Brother HL-2250DN printer.

This package basically does all that the manual installation requires you to do, but it ensures that all dependencies (eg. a2ps, cups and lib32-glibc if you are on a x86_64 system) are installed and that the driver files are managed by the package system.

For full information on installing packages from AUR, refer to the AUR section.

Building the AUR package

To install the printer driver, use the following steps:

  1. Acquire the tarball which contains the PKGBUILD and the patches from this page
  2. Extract the tarball (preferably in a folder set aside just for builds from the AUR) with tar -xzf brother-hl2250dn.tar.gz.
  3. Run makepkg in the directory where the files are saved (makepkg -s will automatically resolve dependencies with pacman). This will download the code, compile it and pack it.
  4. Install the resulting package with pacman:
# pacman -U /path/to/brother-hl2250dn-version-number.tar.xz

After installation of the package, you can proceed to configure the printer as described on on this page. Follow step 5a for USB connection, and step 5b for a networked printer.


Installing manually

Download Brother HL-2250DN drivers

Create a temp directory such as ~/brother

Download the RPM packages of the CUPS wrapper (HERE) and the LPR driver (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 *.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

/home/username/brother/usr/local/Brother/Printer/HL2250DN/cupswrapper/cupswrapperHL2250DN-2.0.4

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

Next, edit:

/home/username/brother/usr/local/Brother/Printer/HL2250DN/inf/setupPrintcap2

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/Printer/HL2250DN/cupswrapper/
# ./cupswrapperHL2250DN-2.0.4

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 HL2250DN printer automatically installed and configured, for USB connection.

Configuring the connection

Follow step 5a for USB connection, and step 5b for a network connection, on this page.

Print a test page and configure the printer settings to your liking.

Auto start

You will want to edit the /etc/rc.conf file to start cups on every reboot. Add cupsd to the daemon list.

Regional Settings

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.

Alternative Options

I failed to get the above to work for various reasons, but am having moderate success with the Generic PCL Laser Printer driver over IPP.