Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] How To Install Brother HL-2040
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
bdm
Guru
Guru


Joined: 20 Jan 2006
Posts: 305
Location: Canada, Barrie, Ontario

PostPosted: Sat Feb 11, 2006 9:10 pm    Post subject: [Solved] How To Install Brother HL-2040 Reply with quote

So I have a Brother HL-2040 printer, but don't really know where to start on installing it. I've search Google and the Gentoo-Wiki, but can't seem to find the proper documentation.

Any help is greatly appreciated.

Thanks!


Last edited by bdm on Mon Oct 23, 2006 3:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32461
Location: 56N 3W

PostPosted: Sat Feb 11, 2006 9:33 pm    Post subject: Reply with quote

Glass Casket,

From what I can see, you have a good chance of getting your printer working with CUPS and the driver here

First install CUPS, following the first link. Don't do the
Code:
cat test>/dev...
part way through. It won' work for you. After CUPS in installed, you can find some drivers for other distros at the second link. I would choose the RedHat one. There are probably install instructions on that site somewhere because they are not in the file.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
bdm
Guru
Guru


Joined: 20 Jan 2006
Posts: 305
Location: Canada, Barrie, Ontario

PostPosted: Sat Feb 11, 2006 9:56 pm    Post subject: Reply with quote

I installed CUPS, and it prints, but it only prints blank pages, lol :P
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32461
Location: 56N 3W

PostPosted: Sat Feb 11, 2006 10:12 pm    Post subject: Reply with quote

Glass Casket,

Thats a start - you now need the CUPS wrapper from the Brother website
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
bdm
Guru
Guru


Joined: 20 Jan 2006
Posts: 305
Location: Canada, Barrie, Ontario

PostPosted: Sat Feb 11, 2006 10:31 pm    Post subject: Reply with quote

I don't know if it's just me, but the RPM package just dosen't seem to want to install :S
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32461
Location: 56N 3W

PostPosted: Sat Feb 11, 2006 10:45 pm    Post subject: Reply with quote

Glass Casket,

You cannot install an RPM directly on Gentoo, You have to take it apart and install the bits by hand.
There are only two files in the package - I didn't look like a proper RMP. If the filename ends in RPM, try rpm2targz to make it more manageable. emerge rpm2targz if neded.

This will give you a fille called cupswrapperHL2040-1.0.0-1.i386.tar.gz which you unpack with
Code:
tar -xzvf cupswrapperHL2040-1.0.0-1.i386.tar.gz


This gives you two files in the tree
Code:
./
./usr/
./usr/local/
./usr/local/Brother/
./usr/local/Brother/cupswrapper/
./usr/local/Brother/cupswrapper/brcupsconfig2
./usr/local/Brother/cupswrapper/cupswrapperHL2040-1.0.0
You can install them like that and tell Gentoo how to find them or put them where Gentoo expects to fine them.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
denials
n00b
n00b


Joined: 11 Jan 2004
Posts: 27
Location: Sudbury, Ontario

PostPosted: Sun Apr 09, 2006 2:17 am    Post subject: Got the HL2040 working; here's how Reply with quote

This was much trickier than it should have been, but it's now working here. I'm assuming you already have a working CUPS installation and that usblp support is either built into your kernel or loaded as a module.

1. emerge rpm2targz
2. Download both brhl2040lpr-1.1.2-2.i386.rpm and cupswrapperHL2040-1.0.0-1.i386.rpm from the Brother Web site. They're in the Downloads -> Drivers -> Monochrome laser -> Linux section of the site.
3. Convert both RPM files to tarballs using rpm2targz, then extract the tarballs:
Code:

$ rpm2targz brhl2040lpr-1.1.2-2.i386.rpm
$ rpm2targz cupswrapperHL2040-1.0.0-1.i386.rpm
$ tar xzf cupswrapperHL2040-1.0.0-1.i386.tar.gz
$ tar xzf brhl2040lpr-1.1.2-2.i386.tar.gz

This creates a usr and a var directory in your current working directory.
4. As root, copy all of the files that were extracted into the usr directory into the corresponding directories in /usr/.
Code:

# cp usr/bin/brprintconflsr /usr/bin/.
# cp usr/lib/libbrcomplpr.so /usr/lib/.
# mv usr/local/Brother /usr/local/.

5. Modify the /usr/local/Brother/cupswrapper/cupswrapperHL2040-1.0.0 script to point to /etc/init.d/cupsd instead of /etc/init.d/cups; this change is required in three locations in this file.
6. Run the /usr/local/Brother/cupswrapper/cupswrapperHL2040-1.0.0 script to set up the Brother HL2040 laser.
7. Create a symbolic link from /usr/local/Brother/inf/brHL2040rc to /usr/local/Brother/inf/brPrintList.
Code:

cd /usr/local/Brother/inf
ln -sf brHL2040rc brPrintList

8. The printer defaults to A4 sized paper; if you're in North America you probably want to open /usr/local/Brother/inf/brHL2040rc in an editor and set PaperType=Letter.
9. Fire up the CUPS administration console (http://localhost:631 just might work); your Brother HL-2040 should be listed, and you should be able to print a test page. Yay!

Dan
Back to top
View user's profile Send private message
benster
n00b
n00b


Joined: 30 Nov 2005
Posts: 67
Location: Funkytown

PostPosted: Mon Apr 10, 2006 4:25 am    Post subject: It Works! Reply with quote

Wonderful, thank you denials! I had myself just gotten to the CUPS step after having installed, but never got the darn thing to print. A couple notes:

for step (5), I found no entries in the /usr/local/Brother/cupswrapper/cupswrapperHL2040-1.0.0 file that needed changing to /etc/init.d/cupsd; the entries I saw were already that way... :?:

The only thing I didn't remember doing when I tried setting up the printer a few months back was setting up the symbolic link, so if I had to make a wager, then it would be the creation of the symlink that made it work.

Muchos Gracias for figuring it out. :D
Back to top
View user's profile Send private message
Lafe
n00b
n00b


Joined: 25 Jul 2004
Posts: 6

PostPosted: Thu Aug 17, 2006 1:19 am    Post subject: Excellent! Reply with quote

I just wanted to add a note of thanks to you Denials! It worked great for me as well. I'd gotten as far as printing blank pages, and hadn't the will to go on past that point. :)

Well done!
_________________
Lafe
Back to top
View user's profile Send private message
bdm
Guru
Guru


Joined: 20 Jan 2006
Posts: 305
Location: Canada, Barrie, Ontario

PostPosted: Fri Oct 20, 2006 2:10 pm    Post subject: Reply with quote

denials, thanks for that throurough tutorial, but I did what you said before CUPS was installed (this is a new installation). What can I do now to have minimal damage?
Back to top
View user's profile Send private message
bdm
Guru
Guru


Joined: 20 Jan 2006
Posts: 305
Location: Canada, Barrie, Ontario

PostPosted: Mon Oct 23, 2006 12:59 am    Post subject: Reply with quote

Just wanted to post back and report a success!

Thanks again.
_________________
Paludis, the newest and best pkgcore replacement
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 5743
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Thu Nov 16, 2006 7:59 pm    Post subject: Reply with quote

@denials:

just wanted to say: "thank you"

this worked fine with the MFC5840CN, in this way I'm not dependent on a rpm installation, yay! :D
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.3.0-r2
2.6.37.2_plus_v1: BFS, CFS,THP,compaction, zcache or TOI
Hardcore Linux user since 2004 :D
Back to top
View user's profile Send private message
bdm
Guru
Guru


Joined: 20 Jan 2006
Posts: 305
Location: Canada, Barrie, Ontario

PostPosted: Fri Nov 17, 2006 3:04 am    Post subject: Reply with quote

Actually, I'm still having problems. As soon as I installed it with your guide, ti worked fine until I rebooted. Now I can't even access the the CUPS local site to check my printers status. And yes, CUPS is as put as boot.

Any ideas?
_________________
Paludis, the newest and best pkgcore replacement
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 5743
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Sun Nov 19, 2006 12:15 am    Post subject: Reply with quote

Code:
rc-update -s

show what for cups ?

do a
Code:
etc-update


and
Code:
/etc/init.d/cupsd restart


then take a look again at 127.0.0.1:631

otherwise look if dependencies for cups changed:

Code:
revdep-rebuild -p


(before that removing old files:
Code:
rm /root/.revdep*

might be necessary)
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.3.0-r2
2.6.37.2_plus_v1: BFS, CFS,THP,compaction, zcache or TOI
Hardcore Linux user since 2004 :D
Back to top
View user's profile Send private message
reyneke
Guru
Guru


Joined: 09 Jan 2004
Posts: 542
Location: Augsburg / Germany

PostPosted: Wed Jan 10, 2007 4:06 pm    Post subject: [b]This also works for HL2030 Reply with quote

First of all: one huge thank you goes to Denials for this howto. You just made my day.
This Howto also works flawlessly for a Brother HL-2030. There's only one little problem: the drivers do not work with cups-1.2.x. Even the workaround proposed in the Brother FAQs didn't work (for me). Solution: install cups-1.1.28.

Cheers,
rey
_________________
I like to wait to see how things turn out
If You Apply Some Pressure
WHAT HAPPENS when you lose EVERYTHING?
You start again.
You start all over again.

Maximo Park - Apply Some Pressure
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 5743
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Wed Jan 10, 2007 4:36 pm    Post subject: Reply with quote

you tried those ?:

http://forums.gentoo.org/viewtopic-p-3832567.html#3832567

these are in fact Denials steps but modified / completed by myself to work with cups-1.2*

kudos & thanks to him :D
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.3.0-r2
2.6.37.2_plus_v1: BFS, CFS,THP,compaction, zcache or TOI
Hardcore Linux user since 2004 :D
Back to top
View user's profile Send private message
reyneke
Guru
Guru


Joined: 09 Jan 2004
Posts: 542
Location: Augsburg / Germany

PostPosted: Wed Jan 10, 2007 5:25 pm    Post subject: Reply with quote

kernelOfTruth wrote:
you tried those ?:

w00t! Now it works perfectly! Thank you for this hint.
Back to top
View user's profile Send private message
bluesea
n00b
n00b


Joined: 10 May 2004
Posts: 27

PostPosted: Tue May 26, 2009 2:18 am    Post subject: excellent. one mod needed for me. Reply with quote

Great guide. The only difference for me was that the brother script created
Code:
/usr/lib/cups/filter/brlpdwrapperHL2040

which CUPS could not find.

See that foomatic-rip was another cupsFilter, I put a copy (ln -s) of brlpdwrapperHL2040 everywhere that there was a copy of foomatic-rip, all of which are links to the /usr/bin version:
Code:

cd /usr/lib/ppr/interfaces/
ln -s /usr/lib/cups/filter/brlpdwrapperHL2040 .
cd /usr/lib/ppr/lib/
ln -s /usr/lib/cups/filter/brlpdwrapperHL2040 .
cd /usr/libexec/cups/filter/
ln -s /usr/lib/cups/filter/brlpdwrapperHL2040 .

Success!
_________________
erutangiS
Back to top
View user's profile Send private message
godsmack420
Apprentice
Apprentice


Joined: 11 Feb 2005
Posts: 151
Location: Wintersville, OH

PostPosted: Fri May 29, 2009 5:35 am    Post subject: Reply with quote

I had the same problem not finding the filter and copied brlpdwrapperHL2040 to the directories listed above but now I get "Printer not connected; will retry in 30 seconds..." error in CUPS. The printer is connected, any ideas of what to try? I've restarted CUPS, rebooted, and made sure USB printing support was compiled in kernel.
Back to top
View user's profile Send private message
Alakhai
Apprentice
Apprentice


Joined: 16 Oct 2003
Posts: 151

PostPosted: Tue Jan 04, 2011 1:26 pm    Post subject: Reply with quote

We should upload this guide to gentoo wiki... It is great! it worked for me with MFC7440N
_________________
Gentoo Linux 64Bit User
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum