I have a Brother HL-2350DW printer but itβs not a supported model. Here is a guide on how to install this printer and this could be helpful for other models as well.
Motivation
To add a printer, usually you can go to Devices->Printers
tab in gnome-settings
. Click Unlock
and after authentication, click Add...
. It will try to find the printer and you can also specify its IP address as well. Click the printer and in the next pop-up window you can see a list of manufacturers and supported models.
My Brother 2350DW is not supported, so I have to install the driver first, and then you can select the correct driver to add the printer.
Unfortunately, drivers are usually proprietary and thus Clear Linux cannot ship them, so in the next section will cover the way how I installed the driver and added the printer.
Installation
Method 1, manual install according to official guide
Brother has its Linux driver in rpm
and deb
packages, and I downloaded the rpm
driver package.
After downloading both of them, I took a look of the rpm package, which looks like this
βββ etc
β βββ opt
β βββ brother
β βββ Printers
β βββ HLL2350DW
β βββ inf
βββ opt
β βββ brother
β βββ Printers
β βββ HLL2350DW
β βββ cupswrapper
β β βββ brother-HLL2350DW-cups-en.ppd
β β βββ Copying
β β βββ lpdwrapper
β β βββ paperconfigml2
β βββ inf
β β βββ brHLL2350DWfunc
β β βββ brHLL2350DWrc
β β βββ setupPrintcap
β βββ LICENSE_ENG.txt
β βββ LICENSE_JPN.txt
β βββ lpd
β βββ armv7l
β β βββ brprintconflsr3
β β βββ rawtobr3
β βββ i686
β β βββ brprintconflsr3
β β βββ rawtobr3
β βββ lpdfilter
β βββ x86_64
β βββ brprintconflsr3
β βββ rawtobr3
βββ var
βββ spool
βββ lpd
βββ HLL2350DW
This is optional but I prefer to know what are about to be installed.
I also checked the install scripts of the rpm package by
rpm -qp --scripts hll2350dwpdrv-4.0.0-1.i386.rpm
, where rpm
can be installed by swupd bundle-add dnf
.
Following the official guide, I installed the driver by executing
rpm -ihv --nodeps hll2350dwpdrv-4.0.0-1.i386.rpm
And then I can add the driver via the web interface of CUPS
at http://localhost:631/printers/
, which requires me to correctly specify certain parameters such as Device URI and Manufacturer.
More details are available on the official website.
Method 2, via official Driver Install Tool
Brother also has a utility Driver Install Tool
, which contains shell scripts to install the driver and (optionally) add the printer.
I downloaded this utility and find that its just bash scripts to install and uninstall the driver. Although the script is considerably long, I read it and found that itβs not likely to break the system.
Execute the script with root
privilege, when it ask me whatβs the model of my printer, I entered hll2350dw
because the script matches the product name with a rpm
package in the same directory.
Then it allows me to specify Device URI for adding the printer, and after I gave it the IP address, the driver is added.
Takeaway
For a more general case where thereβs no such driver install tool available, the following lines of codes might help, which comes from the Driver Install Tool of Bose.
Under the hood, what it does is the following:
- Install the driver by
rpm -ihv --nodeps --replacefiles --replacepkgs hll2350dwpdrv-4.0.0-1.i386.rpm
- The post-install script of the rpm mainly did two things:
- Creates symlinks
- Install a
ppd
file by
, which should be able to add the printer if itβs connected via USB.lpadmin -p HLL2350DW -E -v usb://dev/usb/lp0 -P /usr/share/ppd/brother/brother-HLL2350DW-cups-en.ppd
- After I specified the URI, it does
lpadmin -p HLL2350DW -v socket://192.168.1.130 -E
So, try these
- Install the driver with
rpm -ihv --nodeps --replacefiles --replacepkgs DRIVER.rpm
- If the printer is connected via USB,
lpadmin -p MODEL -E -v usb://dev/usb/lp0 -P PPD_FILE
PPD_FILE
is the path to PostScript Printer Description files, which in my case is/usr/share/ppd/MANUFACTURER/MODLE.ppd
. This can be opened by text editor and in which theModelName
tells you what you should use to replaceMODEL
inlpadmin
command. - If the printer is in other location and you know its Lan IP address,
lpadmin -p MODEL -v socket://IP_ADDRESS -E
- To make it better, you can modify the install scripts of
rpm
so it operates on/usr/local/
instead of/usr
.