Guide: Installing Printer Driver (Brother HL-2350DW)

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:

  1. Install the driver by
    rpm -ihv --nodeps --replacefiles --replacepkgs hll2350dwpdrv-4.0.0-1.i386.rpm
    
  2. The post-install script of the rpm mainly did two things:
    1. Creates symlinks
    2. Install a ppd file by
      lpadmin -p HLL2350DW -E -v usb://dev/usb/lp0 -P /usr/share/ppd/brother/brother-HLL2350DW-cups-en.ppd
      
      , which should be able to add the printer if it’s connected via USB.
  3. After I specified the URI, it does
    lpadmin -p HLL2350DW -v socket://192.168.1.130 -E
    

So, try these

  1. Install the driver with
    rpm -ihv --nodeps --replacefiles --replacepkgs DRIVER.rpm
    
  2. 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 the ModelName tells you what you should use to replace MODEL in lpadmin command.
  3. If the printer is in other location and you know its Lan IP address,
    lpadmin -p MODEL -v socket://IP_ADDRESS -E
    
  4. To make it better, you can modify the install scripts of rpm so it operates on /usr/local/ instead of /usr.

–replacefiles
Install the packages even if they replace files from other,
already installed, packages.

–replacepkgs
Install the packages even if some of them are already installed
on this system.

It’s dangerous, avoid it; if there’s no another way - make a backup of all replaced files.

It seems to me that it’s unlikely drivers from different vendors will install the same file.

I used these instructions to install an HL-4570CDW, but it didn’t complete the install. Although it created the printer, it would not print. To get it to work, I went into Printer Details and installed the PPD file.

Brother gives very good instructions on how to extract the PPD from a Windows PC here: https://help.brother-usa.com/app/answers/detail/a_id/164936/~/how-to-create-a-brother-ppd-file-for-installation---linux

I suppose I could have used a line command you described under Takeaway to install the PPD, but it was just as easy to use the UI for Printer Details.

I had also the issue of printer not printing, and then figure out that what ever documented by Brother, the rpm command is run with option --nodeps, so the driver is installed without dependencies and will not work, so it should be run without --nodeps !!!
So either you run directly the rpm command without --nodeps or you update the Install tool script to remove in the rpm command the --deps. Et voila :wink:

to use the add printer function In system settings, where is it looking for the driver, for the printer selected? Just trying to figure this out.

I was able to get it working in Yast on an OpenSuse Tumbleweed install but, cannot seem to get it working on clear Linux. Clear Linux is absolutely working the best on this computer without, any operational issues. Really like it!

Should the RPM be placed into a specific place to install it? It is currently in \downloads and changed to the dir. before running rpm -qp --scripts hll2350dwpdrv-4.0.0-1.i386.rpm

However, I am getting, error: cannot open Packages database in /var/lib/rpm

Is there an app to open and safely edit the RPM install script. Trying to wrap my head around how the rpm file actually works in the install process. Past MCSE and can usually figure things out on my own but, have been away from Linux for a while.

The RPM ran but, had errors. I saved the console screen from it running and I can post it here if, anyone would like to look at it.

Thanks in advance for any help!

John

There is no RPM directory in /var/lib/

Well, while looking through Clear Linux trying to find a way to get the printer working I stumbled across this little gem.

Manage_printing

Click it and it will pretty much walk you through getting your printer working! The Brother HL-2350DW is listed and works like a champ!

1 Like