LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-05-2016, 03:51 AM   #1
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware 14.1 64-bit, slackware 14.2 64-bit, SystemRescueCD
Posts: 470

Rep: Reputation: 105Reputation: 105
brother printer drivers installation


As setting up a printer seems to be a recurrent topic, I thought
I'd post this info here. Hope it's useful for some of you.

I have a brother laser printer (HL-L2300D). When I set it up on
slackware 14.0 and 14.1, the only driver available was a generic one.
I wrote a SlackBuild and installed it.

I'm about to set up my printer on my newly installed slackware 14.2.
I went to the brother web site and I noticed that they have a driver
for my model. I downloaded it, along with the cups wrapper.
I wrote a new SlackBuild for it and built it.
I haven't installed / tested it yet.

I put the RPMS files and my SlackBuild here:
http://vonbiber.byethost17.com/slack...otherhll2300d/

If you go there:
http://support.brother.com/g/b/count...x?c=us&lang=en

click on 'Product Search', then on the type of product, etc.
chances are you'll find a driver that works for your model and that you
can adapt my SlackBuild to that driver.

Last edited by vonbiber; 09-05-2016 at 03:53 AM.
 
Old 09-05-2016, 07:47 AM   #2
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 14.2 + Multilib
Posts: 1,483

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Thanks for the SlackBuild, vonbiber !

Copied into my /home/dld/brother/ directory for future use !

-- kjh
 
Old 09-05-2016, 08:57 AM   #3
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware 14.1 64-bit, slackware 14.2 64-bit, SystemRescueCD
Posts: 470

Original Poster
Rep: Reputation: 105Reputation: 105
Well, it didn't work exactly as expected (after I installed my package) the first time.
I figured cups expects the ppd wrapper file in another location
I created a symbolic to it and restarted cups and it seemed to work.

So I rewrote the SlackBuild and added a doinst.sh inside it that just does that.
I uploaded the new version of SlackBuild:

http://vonbiber.byethost17.com/slack...otherhll2300d/

Hopefully this time, things will run more smoothly.

Recap of the steps to set up the printer:
1. Build and install the driver with its cups wrapper
2. launch cups if it's not already running:
chmod +x /etc/rc.d/rc.cups restart
3. Open a web browser and go to "http://localhost:631"
Click on 'Adding Printers and Classes' (under CUPS for Administrators)
This model should appear on the list ...
 
1 members found this post helpful.
Old 09-05-2016, 09:17 AM   #4
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 14.2 + Multilib
Posts: 1,483

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Thanks for the update, vonbiber !

Cloned the old, saved the new.

I did 'borrow' and apply an incredibly clever chunk of code from the Standard SBo SlackBuild Template which I applied to the permissions( ) function in your SlackBuild.

The only functional difference is that they invoke the -L flag on the find command ( -L -> follow links ) .

Otherwise, it accomplishes all the chmod commands ( plus 750->755 and 640->644 ) in a single invocation of find ( sweet code there )

A unified diff against your latest SlackBuild is below.

Thanks again for sharing !

-- kjh

$ diff -Naur brotherhll2300d.SlackBuild.orig brotherhll2300d.SlackBuild

Code:
--- brotherhll2300d.SlackBuild.orig     2016-09-05 09:01:06.967518227 -0500
+++ brotherhll2300d.SlackBuild  2016-09-05 09:07:25.074550074 -0500
@@ -72,16 +72,11 @@
 permissions()
 {
 chown -R root:root .
-find . -perm 664 -exec chmod 644 {} \;
-find . -perm 600 -exec chmod 644 {} \;
-find . -perm 444 -exec chmod 644 {} \;
-find . -perm 400 -exec chmod 644 {} \;
-find . -perm 440 -exec chmod 644 {} \;
-find . -perm 777 -exec chmod 755 {} \;
-find . -perm 775 -exec chmod 755 {} \;
-find . -perm 511 -exec chmod 755 {} \;
-find . -perm 711 -exec chmod 755 {} \;
-find . -perm 555 -exec chmod 755 {} \;
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+  -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+  -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
 }
 
 if [ $UID -ne 0 ]; then
 
Old 09-05-2016, 11:03 AM   #5
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware 14.1 64-bit, slackware 14.2 64-bit, SystemRescueCD
Posts: 470

Original Poster
Rep: Reputation: 105Reputation: 105
Speaking of permissions, with all this editing, they were left out.
I uploaded the new SlackBuild.

If you want to edit by hand the previous one, add this line

permissions

right after the extraction of the archive (2 instances):
Code:
rpm2cpio $CWD/$CUPSarchive ...
...
cd opt

permissions
and

Code:
rpm2cpio $CWD/$LPRarchive ...
...

permissions

cp -a var $PKG
...
 
Old 09-05-2016, 07:49 PM   #6
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
Did you try the stock Foomatic/hpijs-pcl5e CUPS driver?
I have not the same printer (Brother HL-2070N) but I found it renders better with it than the Brother driver

I see your model is GDI emulation, don't know if it would work with PCL though
 
Old 09-06-2016, 05:37 AM   #7
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware 14.1 64-bit, slackware 14.2 64-bit, SystemRescueCD
Posts: 470

Original Poster
Rep: Reputation: 105Reputation: 105
Quote:
Originally Posted by keefaz View Post
Did you try the stock Foomatic/hpijs-pcl5e CUPS driver?
I have not the same printer (Brother HL-2070N) but I found it renders better with it than the Brother driver
No, I didn't.
What did you do exactly?
I went there: https://www.openprinting.org/printers/
but I didn't see my model
I see that foomatic-filters are installed in slackware, but not the engine or the database...
 
Old 09-06-2016, 06:40 AM   #8
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 14.2 + Multilib
Posts: 1,483

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
keefaz --

I've never been able to print directly to a GDI Printer ( aka a WinPrinter ) without some sort of emulator.

[EDIT] Note the emulation in the two Printer Spec Pages.

Vonbiber's printer is definitely a GDI Printer HL-L2300D Compact, Personal Laser Printer.

OTOH, your HL-2070N Compact, Network Laser Printer supports pcl6 directly so that's a HUGE difference between your 2070N and vonbiber's 2300D.

Sometimes, in the olden days when Linux printing was not supported much if at all my the Mfgs, you might make a GDI printer work with one of the 'foo2*' drivers ( example: foo2zjs, depending on the make and model ).

Things are a little better today with quite a few of the GDI Printers being supported on Linux by the Mfgs.

Anyhow, this is why I was interested in vonbiber's SlackBuild.

-- kjh

Last edited by kjhambrick; 09-06-2016 at 07:18 AM. Reason: note the emulation
 
Old 09-06-2016, 07:07 AM   #9
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 14.2 + Multilib
Posts: 1,483

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
vonbiber --

More Qs

Are you running Slackware 14.2 32-bit or do you run Slackware64 + Multilib ?

The reason I ask is that there are three 32-bit ELF Programs in the resulting SlackBuild that won't run on a pure 64-bit System.

Thanks !

-- kjh

Code:
# 
# make a working directory
#
mkdir -p /tmp/brother
#
# extract Package into /tmp/brother
#
cd  /tmp/brother
tar -xvf /tmp/Brother-SlackBuild-vonbiber/brotherhll2300d-3.2.0-1-x86_64-1_vbi.txz
#
# check for executable programs ...
#
file $(find usr var -type f) |grep ELF

usr/share/brother/Printers/HLL2300D/lpd/brprintconflsr3: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, not stripped
usr/share/brother/Printers/HLL2300D/lpd/rawtobr3:        ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, not stripped
usr/share/brother/Printers/HLL2300D/inf/braddprinter:    ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, not stripped
 
Old 09-06-2016, 07:44 AM   #10
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware 14.1 64-bit, slackware 14.2 64-bit, SystemRescueCD
Posts: 470

Original Poster
Rep: Reputation: 105Reputation: 105
Quote:
Originally Posted by kjhambrick View Post
vonbiber --

More Qs

Are you running Slackware 14.2 32-bit or do you run Slackware64 + Multilib ?

The reason I ask is that there are three 32-bit ELF Programs in the resulting SlackBuild that won't run on a pure 64-bit System.

Thanks !

-- kjh
I am running slackware64 + multilib.
I mentioned earlier in another post that the drivers were 32-bit,
so you need to install at least glibc-solibs*_multilib-x86_64*, cups-compat32
from alien bob if you have a 64-bit system.
I mentioned that in
http://vonbiber.byethost17.com/slack...00d/x86_64.txt
 
Old 09-06-2016, 07:45 AM   #11
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 14.2 + Multilib
Posts: 1,483

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
oops, sorry about the noise, vonbiber.

I missed that file !

Thanks.

-- kjh
 
Old 09-06-2016, 08:04 AM   #12
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
Quote:
Originally Posted by vonbiber View Post
No, I didn't.
Sorry your printer won't apply (GDI only), thanks kjhambrick for the links
 
Old 09-06-2016, 03:45 PM   #13
offgridguy
Senior Member
 
Registered: Nov 2015
Location: Alberta Canada
Distribution: Windows10, Debian
Posts: 1,109

Rep: Reputation: 147Reputation: 147
@ vonbiber, Thank you for the links, I hope to someday get my Brother 7030 configured in Slackware.
I do have a question though, perhaps someone could clarify. Looking at the Brother site I see the drivers are available as RPM or DEB packages. Reading the >Slack Docs. I recall seeing that the default file system was tnz ( I could be wrong on that) But I am assuming this is why the necessity
of Slack Builds ie: to convert the binaries to a file that is readable by Slackware?

Last edited by offgridguy; 09-06-2016 at 03:46 PM. Reason: typo
 
Old 09-06-2016, 04:18 PM   #14
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware 14.1 64-bit, slackware 14.2 64-bit, SystemRescueCD
Posts: 470

Original Poster
Rep: Reputation: 105Reputation: 105
Quote:
Originally Posted by offgridguy View Post
@ vonbiber, Thank you for the links, I hope to someday get my Brother 7030 configured in Slackware.
I do have a question though, perhaps someone could clarify. Looking at the Brother site I see the drivers are available as RPM or DEB packages. Reading the >Slack Docs. I recall seeing that the default file system was tnz ( I could be wrong on that) But I am assuming this is why the necessity
of Slack Builds ie: to convert the binaries to a file that is readable by Slackware?
rpm, deb, txz is a way of packing files together: txz is the resulting of applying first the
command 'tar' then 'xz'. The rpm and deb packages can be installed directly on debian-type systems (deb)
or fedora-type ones (rpm). For slackware, you need to unpack them, move files around,
edit some files, ...
Did you find the drivers for your printer (either rpm or deb)? If so, post me the link
and I'll see if I (or someone else) can help you with it.
 
Old 09-06-2016, 05:44 PM   #15
offgridguy
Senior Member
 
Registered: Nov 2015
Location: Alberta Canada
Distribution: Windows10, Debian
Posts: 1,109

Rep: Reputation: 147Reputation: 147
Quote:
Originally Posted by vonbiber View Post
rpm, deb, txz is a way of packing files together: txz is the resulting of applying first the
command 'tar' then 'xz'. The rpm and deb packages can be installed directly on debian-type systems (deb)
or fedora-type ones (rpm). For slackware, you need to unpack them, move files around,
edit some files, ...
Did you find the drivers for your printer (either rpm or deb)? If so, post me the link
and I'll see if I (or someone else) can help you with it.
Thank you for the offer. Here is the link to the brother site, the drivers here work for my printer,
I have used it many times with ubuntu and Mint.
http://support.brother.com/g/b/downl...od=dcp7030_all
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] brother printer drivers randyvh Linux - Newbie 5 10-09-2015 06:01 PM
Brother DCP-J4110DW printer-Drivers Nuffield Linux - Newbie 2 02-06-2015 06:59 PM
Drivers for Brother MFC J430 w printer jbander Linux - Hardware 1 07-26-2013 07:44 PM
Unable to install Brother printer drivers siouxzieq Linux - Hardware 8 01-04-2012 04:35 PM
Brother Printer Drivers Site Down Michael Johnson Linux - General 1 07-21-2005 01:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration