LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   brother printer drivers installation (https://www.linuxquestions.org/questions/slackware-14/brother-printer-drivers-installation-4175588754/)

vonbiber 09-05-2016 03:51 AM

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.

kjhambrick 09-05-2016 07:47 AM

Thanks for the SlackBuild, vonbiber !

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

-- kjh

vonbiber 09-05-2016 08:57 AM

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 ...

kjhambrick 09-05-2016 09:17 AM

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


vonbiber 09-05-2016 11:03 AM

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
...


keefaz 09-05-2016 07:49 PM

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

vonbiber 09-06-2016 05:37 AM

Quote:

Originally Posted by keefaz (Post 5601236)
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...

kjhambrick 09-06-2016 06:40 AM

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

kjhambrick 09-06-2016 07:07 AM

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


vonbiber 09-06-2016 07:44 AM

Quote:

Originally Posted by kjhambrick (Post 5601414)
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

kjhambrick 09-06-2016 07:45 AM

oops, sorry about the noise, vonbiber.

I missed that file !

Thanks.

-- kjh

keefaz 09-06-2016 08:04 AM

Quote:

Originally Posted by vonbiber (Post 5601385)
No, I didn't.

Sorry your printer won't apply (GDI only), thanks kjhambrick for the links

offgridguy 09-06-2016 03:45 PM

@ 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?

vonbiber 09-06-2016 04:18 PM

Quote:

Originally Posted by offgridguy (Post 5601609)
@ 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.

offgridguy 09-06-2016 05:44 PM

Quote:

Originally Posted by vonbiber (Post 5601622)
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


All times are GMT -5. The time now is 02:20 PM.