View previous topic :: View next topic |
Author |
Message |
sirlark Guru
Joined: 25 Oct 2004 Posts: 306 Location: Limerick, Ireland
|
Posted: Wed Apr 04, 2012 3:26 pm Post subject: Brother MFC-7360 [USB]: A Step by Step guide |
|
|
There is a generic install script available on the Brother website. I found it at http://www.brother.com/cgi-bin/agreement/agreement.cgi?dlfile=http://www.brother.com/pub/bsc/linux/dlf/linux-brprinter-installer-1.0.4-1.gz&lang=English_lpr, but stuff moves around on the Brother website and the links often go stale. If this link doesn't work, find the FAQ for linux and look for the question "I'm finding it difficult to install the printer driver.", which I found at http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/faq_prn.html#f00104.
You can follow the instructions in the FAQ question directly (I did) with some caveats, which I'll list below. Just in case the page disappears, I'll reproduce the FAQ text below, but first let's deal with those caveats:
You will need the following installed before you run the installer:
- net-print/cups: if it's missing the installer will try to manually install cups via rpm, dpkg, direct download. Also note the cups must be installed without the 'usb' USE flag, i.e. USE="-usb".
- net-misc/wget: needed for the installer to download files
- app-arch/rpm: needed for the installer to actually install files (it installs to /usr/local so it's easy to clean up later if necessary)
Also, you need to enable CONFIG_USB_PRINTER in your kernel, either as a module or statically, either is fine. A lot of people these days seem to have CONFIG_USB_PRINTER disabled because of a notice issued by cups when emerged with the usb USE flag set. When the usb USE flag is set, cups uses libusb to drive USB printing, which requires CONFIG_USB_PRINTER be unset, but Brother printers use the old LPD drivers. libusb doesn't detect the printer as a local printer (or at all). USB printers still work without libusb, so disabling the use flag is fine.
From here on out, you can follow the FAQ instructions, reproduced somewhat tersely below for posterity. N.B. The installer must be run as root, and alters your cups config and some symlinks without notice.
- Connect your Brother machine to the PC before starting to follow these instructions.
- Download the installer script (linux-brprinter-installer-1.0.4-1.gz)
- Open a terminal and change to the directory where you downloaded the file
Code: | $ gunzip linux-brprinter-installer-1.0.4-1.gz |
Su to root
Code: | bash linux-brprinter-installer-1.0.4-1 |
You will be asked to enter your machine name, which would be "MFC-7360" if you are interested in this guide, presumably.
Answer yes to to all the questions (licenses and confirmations mainly) until you see the question: "Will you specify the DeviceURI ?", to which you mus answer no
After the last question it took about 30 seconds to return to the prompt; Give it some time, it hasn't hung.
If I get some time, I'll take a long hard look at the installer script and try to write up an ebuild to do the same thing, but no promises. It would be really convenient to have an ebuild for USB brother printers that makes them less painful to install.
Next up, the scanner!
Original message:
Quote: | As you might guess from the subject I hope to write a step-by-step guide to getting the Brother MFC-7360 Printer/Scanner/Fax/Copier working in Gentoo. Brother printers are generally recommend for Linux users because of their generally good linux driver support. Sadly, linux driver driver support usually amounts to debs and rpms only, and simply extracting the files from the rpm doesn't seem to work.
So, as I come up with specific questions I'll post them here, and as they are answered or as I figure things out, I'll come back and edit this post. If anyone out there has managed to get this right, please let me know to... |
_________________ Adopt an unanswered post today
Last edited by sirlark on Tue Mar 19, 2013 8:35 am; edited 2 times in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54208 Location: 56N 3W
|
Posted: Wed Apr 04, 2012 7:50 pm Post subject: |
|
|
sirlark,
---> Start here
The CUPS drivers a probably just PPD files, which are just text. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
kechara n00b
Joined: 23 Feb 2005 Posts: 15 Location: Aabenraa, Denmark
|
Posted: Wed Apr 04, 2012 8:08 pm Post subject: |
|
|
I made myself a step by step guide (sort of) when I bought my Brother printer. It's a different model than yours, but I would guess the steps to do it are the same.
On my Arch linux install I actually just unpacked the files and copied them to their respective folders manually. That also works fine.
If you are interrested you can find my instruction here _________________ Regards,
Kechara
- Give the world a smile, and it'll laugh right back at you |
|
Back to top |
|
|
sirlark Guru
Joined: 25 Oct 2004 Posts: 306 Location: Limerick, Ireland
|
Posted: Wed Apr 04, 2012 10:29 pm Post subject: |
|
|
Okay, I'll start with those specific questions...
1. I don't have an 'N' printer, it's not networked, it's connected via USB.
2. rpm doesn't work for me, I get the following error
Code: | error: Unable to open /usr/lib/rpm/rpmrc for reading: No such file or directory. |
Instead I used rpm2tgz, and extracted the files into a temporary directory. I looked for a ppd file in the directory, but there weren't any. There was an installer script, which on inspection looked like it was meant to output a ppd file. I ran it as root and a ppd was created.
Now, when I add a printer in CUPS, the the printer appears under in the local printers list, but the driver doesn't sow up. Manually selecting the PPD file appears to work, in that I can set the option for the printer. But printing a test page, or requesting a self test page via CUPS sends no data to the printer, i.e. my printer shows no sign whatsoever (doesn't even come out of sleep) when I try to print. _________________ Adopt an unanswered post today |
|
Back to top |
|
|
sirlark Guru
Joined: 25 Oct 2004 Posts: 306 Location: Limerick, Ireland
|
Posted: Wed Apr 04, 2012 10:34 pm Post subject: |
|
|
Oh yeah, and cups thinks the job completed successfully _________________ Adopt an unanswered post today |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Thu Apr 05, 2012 10:02 am Post subject: |
|
|
sirlark, the following procedure worked for a Brother DCP-7065DN printer if the .rpm files are first manually copied into /etc/portage/distfiles/ directory, and I have gone through the text and changed "DCP-7065DN" to "MFC-7360", "DCP7056DN" to "MFC7360" and "dcp7065dn" to "mfc7360" (I notice from the Brother download site that the RPM packages for the DCP-7065DN have the same version numbers are the RPM packages for the MFC-7360, so you should be OK there). If you're having problems with the rpm command extracting files from .rpm packages then I think you need to find the root cause of that first. Which version of app-arch/rpm are you using? 4.9.1.2-r1? Have you tried uninstalling app-arch/rpm and re-installing it?
N.B. If you have never used a local overlay, see NOTE 1 further on before proceeding with the steps below.
The following instructions will install the packages cupswrapperMFC7360-2.0.4 and mfc7360lpr-2.1.0 from a Portage local overlay on your machine. In the text below, replace "fitzcarraldo" with your user name.
1. Save the following as /home/fitzcarraldo/mfc7360lpr-2.1.0.ebuild
Code: | # Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=3
inherit rpm
DESCRIPTION="Brother MFC-7360 LPR driver"
HOMEPAGE="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html#MFC-7360"
SRC_URI="mfc7360lpr-2.1.0-1.i386.rpm"
LICENSE="GPL"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE=""
RESTRICT="fetch strip"
DOWNLOAD_URL="http://www.brother.com/cgi-bin/agreement/agreement.cgi?dlfile=http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/cups_wrapper/mfc7360lpr-2.1.0-1.i386.rpm&lang=English_gpl"
DEPEND=""
RDEPEND="${DEPEND}"
pkg_nofetch() {
einfo "Please download ${A} from ${DOWNLOAD_URL}."
einfo "Select 'I Accept' and move the file to ${DISTDIR}."
}
src_unpack() {
rpm_unpack || die "Error unpacking ${A}."
}
src_install() {
cp -r $WORKDIR $D
mv $D/work/* $D
rm -r $D/work/
} |
2. Save the following as /home/fitzcarraldo/cupswrapperMFC7360-2.0.4.ebuild
Code: | # Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=3
inherit rpm
DESCRIPTION="Brother MFC-7360 CUPS wrapper"
HOMEPAGE="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html#MFC-7360"
SRC_URI="cupswrapperMFC7360-2.0.4-2.i386.rpm"
LICENSE="GPL"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE=""
RESTRICT="fetch strip"
DOWNLOAD_URL="http://www.brother.com/cgi-bin/agreement/agreement.cgi?dlfile=http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/cups_wrapper/cupswrapperMFC7360-2.0.4-2.i386.rpm&lang=English_gpl"
DEPEND="
app-text/a2ps
net-print/mfc7360lpr
"
RDEPEND="${DEPEND}"
pkg_nofetch() {
einfo "Please download ${A} from ${DOWNLOAD_URL}."
einfo "Select 'I Accept' and move the file to ${DISTDIR}."
}
src_unpack() {
rpm_unpack || die "Error unpacking ${A}."
}
src_install() {
cp -r $WORKDIR $D
mv $D/work/* $D
rm -r $D/work/
}
pkg_postinst() {
echo
einfo "If you can't print, create the following symlink:"
einfo "ln -s /usr/lib/cups/filter/brlpdwrapperMFC7360
/usr/libexec/cups/filter/brlpdwrapperMFC7360"
echo
} |
3. Download cupswrapperMFC7360-2.0.4-2.i386.rpm and mfc7360lpr-2.1.0-1.i386.rpm from the Brother download site to the directory /home/fitzcarraldo/Downloads/.
4. Enter the following commands as root user:
Code: | cp /home/fitzcarraldo/Downloads/cupswrapperMFC7360-2.0.4-2.i386.rpm /usr/portage/distfiles/
cp /home/fitzcarraldo/Downloads/mfc7360lpr-2.1.0-1.i386.rpm /usr/portage/distfiles/
mkdir -p /usr/local/portage/net-print/mfc7360lpr
mkdir -p /usr/local/portage/net-print/cupswrapperMFC7360
cd /usr/local/portage/net-print/mfc7360lpr
cp /home/fitzcarraldo/Desktop/mfc7360lpr-2.1.0.ebuild .
ebuild --force mfc7360lpr-2.1.0.ebuild manifest
cd /usr/local/portage/net-print/cupswrapperMFC7360
cp /home/fitzcarraldo/Desktop/cupswrapperMFC7360-2.0.4.ebuild .
ebuild --force cupswrapperMFC7360-2.0.4.ebuild manifest
FEATURES="-collision-detect -protect-owned" emerge -1v cupswrapperMFC7360 mfc7360lpr
etc-update # Just in case there are some config files to update. Enter -3 then answer yes to all. |
N.B. If the above ebuild commands or the emerge command tries to re-download the RPM packages from the Brother Web site and you get an error message about the RPM package not being a tar file or being corrupt, have a look in /usr/portage/distfiles/ and delete any files containing "checksum_failure" as part of the file name. Then disconnect your machine from the network and repeat the above commands (obviously with the exception of the mkdir commands, as the directories now already exist.)
5. If you have sys-apps/file-5.06 installed, you also need to enter the following command to install a later version, as version 5.06 stops some Brother printers from working correctly:
Code: | emerge -1v =sys-apps/file-5.11 |
N.B. Even though the script /usr/local/Brother/Printer/MFC7360/cupswrapper/cupswrapperMFC7360-2.0.4 installed from the RPM package is not correct for Gentoo Linux, I am not certain that Steps 6 and 7 below are necessary, and I don't have a Brother printer so I can't find out. It may be that simply restarting the CUPS daemon (or, alternatively, rebooting) at this point would be sufficient. To simply restart the CUPS daemon, you would use the command:
Code: | /etc/init.d/cupsd restart |
Anyway, Steps 6 and 7 won't do any harm (and may be necessary). If you decide to skip Steps 6 and 7 and see if the printer can still be installed and work correctly, you must at least restart the CUPS daemon (or, alternatively, reboot) at this point.
6. Open the script file /usr/local/Brother/Printer/MFC7360/cupswrapper/cupswrapperMFC7360-2.0.4 with a text editor. If it contains "/etc/init.d/cups" change that to "/etc/init.d/cupsd" (the RPM package is for a different distribution, remember). Also, if it contains "/etc/rc.d/" then change that to "/etc/init.d/" (ditto). Basically, make sure that you have "/etc/init.d/" everywhere rather than "/etc/rc.d/", and that you have "/etc/init.d/cupsd" everywhere rather than "/etc/init.d/cups" or "/etc/rc.d/cups" or whatever.
7. Run the cupswrapperMFC7360-2.0.4 script:
Code: | cd /usr/local/Brother/Printer/MFC7360/cupswrapper
./cupswrapperMFC7360-2.0.4 |
8. Launch a Web browser and enter http://localhost:631/ into the Address bar in order to use the CUPS manager. Use CUPS to install the printer.
--------------------------------------------------------
NOTE 1
Before doing any the above, if you have not used a local overlay before you need to set that up:
Edit /etc/make.conf and make sure it has the following lines in it at the end of the file:
Code: | PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /usr/local/portage/"
ACCEPT_LICENSE="*" |
Give your Portage local overlay a name:
Code: | mkdir /usr/local/portage/profiles
echo "local_overlay" > /usr/local/portage/profiles/repo_name |
-------------------------------------------------------- _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
sirlark Guru
Joined: 25 Oct 2004 Posts: 306 Location: Limerick, Ireland
|
Posted: Fri Apr 06, 2012 10:44 am Post subject: |
|
|
Fitzcarraldo,
Thanks for the detailed instructions, much appreciated, especially the ebuilds. I think my method using rpm2targz to extract the files came to about the same place though, without the convenience of being able to unmerge later, but since everything ends up in local it's not a huge problem. Nonetheless I tried your method, but ran into some additional problems. Though first I addressed the rpm issue, which was a simple case of downgrading from 4.9.1.2-r1 to 4.9.1.2 as per https://bugs.gentoo.org/show_bug.cgi?id=409729
I already had a local portage overlay, so I added your ebuilds but when trying to generate the manifests I get
Code: | # ebuild --force mfc7360lpr-2.1.0.ebuild manifest
!!! /usr/local/portage/net-print/mfc7370lpr/mfc7360lpr-2.1.0.ebuild does not seem to have a valid PORTDIR structure. |
cupswrapper works though
Code: | # ebuild --force cupswrapperMFC7360-2.0.4.ebuild manifest
>>> Creating Manifest for /usr/local/portage/net-print/cupswrapperMFC7360 |
I noticed however that in your ebuild a2ps is a dependency, and I didn't have it installed. I emerged it, and restarted cupsd and now at least the driver shows up when trying to add a printer. Jobs still appear as if they complete without error, but the printer doesn't respond at all.
Thanks again _________________ Adopt an unanswered post today |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Fri Apr 06, 2012 7:27 pm Post subject: |
|
|
sirlark wrote: | Code: | # ebuild --force mfc7360lpr-2.1.0.ebuild manifest !!! /usr/local/portage/net-print/mfc7370lpr/mfc7360lpr-2.1.0.ebuild does not seem to have a valid PORTDIR structure. |
|
Looking at your output, your problem is that you have created a sub-directory named "mfc7370lpr" instead of "mfc7360lpr". _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
daddio Tux's lil' helper
Joined: 11 Oct 2003 Posts: 145 Location: Orem, UT
|
Posted: Sun Apr 15, 2012 4:59 pm Post subject: |
|
|
The cupswrapper just calls to the lpr driver, so if that did not install or is not working, cups will thing it succeeded without ever doing anything.
The docs on the brother site are confusing as to this point, but the fact is that you absolutely must have the lpr driver to use the cupswrapper driver.
Not sure if that helps. |
|
Back to top |
|
|
sirlark Guru
Joined: 25 Oct 2004 Posts: 306 Location: Limerick, Ireland
|
Posted: Mon Apr 23, 2012 12:51 pm Post subject: |
|
|
Hi, I get what you are saying, and I have (as far as I can tell) installed the lpr driver. I think it would help a lot if I could see some error messages, but I don't see any. I'll have a look through the logs tonight. _________________ Adopt an unanswered post today |
|
Back to top |
|
|
sirlark Guru
Joined: 25 Oct 2004 Posts: 306 Location: Limerick, Ireland
|
Posted: Wed Jun 06, 2012 8:20 am Post subject: |
|
|
Right, nothing in the logs that I can find.... no indication anything was even printed, or the printer ever existed. Something very weird is going on here. I've moved the printer to my wife's windows machine in the meanwhile. So the fundamental question remains, how can I debug/diagnose why cups is not sending anything down a USB line to a printer... _________________ Adopt an unanswered post today |
|
Back to top |
|
|
sirlark Guru
Joined: 25 Oct 2004 Posts: 306 Location: Limerick, Ireland
|
Posted: Thu Jan 24, 2013 8:10 am Post subject: |
|
|
So I re-enabled USB printing in my kernel, which I had originally disabled according to the message spat out after an emerge
Code: | Your usb printers will be managed via libusb. In this case
${P} requires the USB_PRINTER support disabled.
Please disable it:
CONFIG_USB_PRINTER=n
in /usr/src/linux/.config or
Device Drivers --->
USB support --->
[ ] USB Printer support
Alternatively, just disable the usb useflag for cups (your printer will still work). |
So I disabled the usb flag for cups, and turned CONFIG_USB_PRINTER on. Then I followed these instructions from the Brother website FAQ and voila! I have a working printer finally. I will edit the original message accordingly now. _________________ Adopt an unanswered post today |
|
Back to top |
|
|
|
|
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
|
|