Skip to content

Instantly share code, notes, and snippets.

@judu
Created September 11, 2019 20:51
Show Gist options
  • Save judu/58e935645b3d000d9e8bf071ee990bb9 to your computer and use it in GitHub Desktop.
Save judu/58e935645b3d000d9e8bf071ee990bb9 to your computer and use it in GitHub Desktop.
Install cups driver for Brother MFC-9330CDW on Exherbo

Install cups drivers for Brother MFC-9330CDW On Exherbo

You will need

  • gcc
  • make
  • app-arch/rpm2targz
  • patchelf
  • an i686-pc-linux-gnu ld-linux.so.2

Download required files (check version if needed)

lpd filter: https://download.brother.com/welcome/dlf100399/mfc9330cdwlpr-1.1.2-1.i386.rpm cups wrapper: https://download.brother.com/welcome/dlf100403/mfc9330cdw_cupswrapper_GPL_source_1.1.4-0.tar.gz

Unpack both

rpm2tar mfc9330cdwlpr-1.1.2-1.i386.rpm && tar xf mfc9330cdwlpr-1.1.2-1.i386.tar
tar xf mfc9330cdw_cupswrapper_GPL_source_1.1.4-0.tar.gz

The first gives you an opt/ folder. Copy the contents of opt/ into /opt/. You don't have a choice, it's mandatory. Then, go to /opt/brother/Printers/mfc9330cdw fix the lpd/brmfc9330cdwfilter:

cd /opt/brother/Printers/mfc9330cdw
patchelf --set-interpreter /usr/i686-pc-linux-gnu/lib/ld-linux.so.2 lpd/brmfc9330cdwfilter

Compile cupswrapper

cd mfc9330cdw_cupswrapper_GPL_source_1.1.4-0/brcupsconfig
make

Install cupswrapper files

Go to /opt/brother/Printers/mfc9330cdw and copy cupswrapper files

cd /opt/brother/Printers/mfc9330cdw
mkdir cupswrapper && cd cupswrapper
cp ${download_dir}/mfc9330cdw_cupswrapper_GPL_source_1.1.4-0/brcupsconfig/brcupsconfpt1 .
cp ${download_dir}/mfc9330cdw_cupswrapper_GPL_source_1.1.4-0/cupswrapper/cupswrappermfc9330cdw .
cp ${download_dir}/mfc9330cdw_cupswrapper_GPL_source_1.1.4-0/PPD/brother_mfc9330cdw_printer_en.ppd .

Fix the cupswrapper installer

Edit /opt/brother/Printers/mfc9330cdw/cupswrapper/cupswrappermfc9330cdw Go to line ~269 and change the /usr/lib/cups/filter to /usr/host/libexec/cups/filter in the if and in the if's body. Then execute it:

chmod +x /opt/brother/Printers/mfc9330cdw/cupswrapper/cupswrappermfc9330cdw
/opt/brother/Printers/mfc9330cdw/cupswrapper/cupswrappermfc9330cdw

Then you can go to cups interface and add you printer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment