Printer Brother DCP-120C, MFC21O

Issues Related to Hardware (Sound, Video, Printers, Scanners, Webcams, Touchpads, Keyboards, Sensors, Drives, GRUB, etc.)

Moderator: Moderators

Printer Brother DCP-120C, MFC21O

Postby baudolino » Thu Sep 06, 2012 12:02

Hi all,
i am new to the forum and I come from the distro Chakra. It is abandoning support for 32-bit and I'm venturing with Sabayon 9, which I am enjoying.
I can not install the printer in question despite having followed the wiki "HOWTO: Install a Brother Printer".
I installed RPM with Rigo and then follow the procedure after acquiring drivers in rpm from the website of Brother, that for my printer-scanner gives me those of the MFC-210C which I had used successfully in Chakra.
I doubt that the wiki is obsolete for sabayon 9 because the procedure does not create folders in lpd/MFC210 var / spool nor is there the / usr / lib / cups / filter / while there is / usr / libexec / cups / filter / in which, however, after installing the rpm files, nothing shows up for a brother.
I was not able to find solutions in the forum, can anyone help me?
Thank you.
baudolino
Baby Hen
 
Posts: 5
Joined: Wed Sep 05, 2012 0:23

Re: Printer Brother DCP-120C, MFC21O

Postby Fitzcarraldo » Thu Sep 06, 2012 23:17

Please don't post the same question in two different sheds (forums). It leads to confusion and split or duplicated responses. I've deleted your other thread about the same thing in the 'Beginners|Newbies Area' shed.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7325
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Printer Brother DCP-120C, MFC21O

Postby Fitzcarraldo » Fri Sep 07, 2012 0:07

Well, I don't have your printer but you may be able to install the MFC-210C driver by using the Portage package manager and a local overlay. I have put together a couple of Portage ebuilds for you, shown below. They may work the first time, or they may need some tweaking. I can't tell if they will work, as I don't want to install the Brother MFC-210C driver, so you'll need to follow the procedure given below and paste here any error messages.

N.B. If you are a Sabayon Linux user who has never used Portage, see NOTE 1 further on before proceeding with the steps below.

The following instructions will install the packages cupswrapperMFC210C-1.0.0 and MFC210Clpr-1.0.2 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/MFC210Clpr-1.0.2.ebuild

Code: Select all
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=3

inherit rpm

DESCRIPTION="Brother MFC-210C LPR driver"
HOMEPAGE="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html#MFC-210C"
SRC_URI="MFC210Clpr-1.0.2-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://www.brother.com/pub/bsc/linux/dlf/MFC210Clpr-1.0.2-1.i386.rpm&lang=English_lpr"
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/cupswrapperMFC210C-1.0.0.ebuild

Code: Select all
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=3

inherit rpm

DESCRIPTION="Brother MFC-210C CUPS wrapper"
HOMEPAGE="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html#MFC-210C"
SRC_URI="cupswrapperMFC210C-1.0.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://www.brother.com/pub/bsc/linux/dlf/cupswrapperMFC210C-1.0.0-1.i386.rpm&lang=English_gpl"

DEPEND="
   app-text/a2ps
   net-print/MFC210Clpr
"
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/brlpdwrapperMFC210C
   /usr/libexec/cups/filter/brlpdwrapperMFC210C"
   echo
}

3. Download cupswrapperMFC210C-1.0.0-1.i386.rpm and MFC210Clpr-1.0.2-1.i386.rpm from the Brother download site to the directory /home/fitzcarraldo/Downloads/.

4. Enter the following commands as root user (notice the dots at the end of the two lines ending in "ebuild ."):

Code: Select all
cp /home/fitzcarraldo/Downloads/cupswrapperMFC210C-1.0.0-1.i386.rpm /usr/portage/distfiles/
cp /home/fitzcarraldo/Downloads/MFC210Clpr-1.0.2-1.i386.rpm /usr/portage/distfiles/
mkdir -p /usr/local/portage/net-print/MFC210Clpr
mkdir -p /usr/local/portage/net-print/cupswrapperMFC210C
cd /usr/local/portage/net-print/MFC210Clpr
cp /home/fitzcarraldo/Desktop/MFC210Clpr-1.0.2.ebuild .
ebuild --force MFC210Clpr-1.0.2.ebuild manifest
cd /usr/local/portage/net-print/cupswrapperMFC210C
cp /home/fitzcarraldo/Desktop/cupswrapperMFC210C-1.0.0.ebuild .
ebuild --force cupswrapperMFC210C-1.0.0.ebuild manifest
emerge -1v cupswrapperMFC210C MFC210Clpr
etc-update # Just in case there are some config files to update. Enter -3 then answer yes to all.

N.B. If you're a user of the Entropy package manager, you'll need to prefix the emerge command as follows:

Code: Select all
FEATURES="-collision-detect -protect-owned" emerge -1v cupswrapperMFC210C MFC210Clpr

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 (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: Select all
emerge -1v sys-apps/file

N.B. Even though the script /usr/local/Brother/Printer/MFC210C/cupswrapper/cupswrapperMFC210C-1.0.0 installed from the RPM package is not correct for Gentoo/Sabayon 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: Select all
/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/MFC210C/cupswrapper/cupswrapperMFC210C-1.0.0 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 cupswrapperMFC210C-1.0.0 script:

Code: Select all
cd /usr/local/Brother/Printer/MFC210C/cupswrapper
./cupswrapperMFC210C-1.0.0

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, users of Sabayon Linux also need to set up their installation to use Portage for the first time if they have not done so already:

Code: Select all
equo install git # Sabayon overlays use Git.
emerge --sync # Download ebuilds from Gentoo ebuild repositories.
layman -S # Get list of 3rd party overlays,
layman -d sabayon # In case old Sabayon overlay was already added. Ignore error message, if any.
layman -d sabayon-distro # In case 2nd new split Sabayon overlay was already added. Ignore error message, if any.
layman -a sabayon # Add 1st new split Sabayon overlay.
layman -a  sabayon-distro # Add 2nd new split Sabayon overlay.
layman -S # Make sure all overlays are synced.

Edit the file /etc/make.conf and make sure it has the following lines in it at the end of the file:

Code: Select all
PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /usr/local/portage/"
ACCEPT_LICENSE="*"

(Delete the line PORTDIR_OVERLAY="/usr/local/portage/" if already in the file.)

Give your Portage local overlay a name:

Code: Select all
mkdir /usr/local/portage/profiles
echo "local_overlay" > /usr/local/portage/profiles/repo_name

--------------------------------------------------------
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7325
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Printer Brother DCP-120C, MFC21O

Postby baudolino » Sat Sep 08, 2012 8:46

Thanks,
tonight I will try the procedure.
Sorry for post in another area.
baudolino
Baby Hen
 
Posts: 5
Joined: Wed Sep 05, 2012 0:23


Return to Hardware

Who is online

Users browsing this forum: No registered users and 1 guest