Today’s plan is to install the Common Unix Printing System on a Debian Wheezy machine and configure it to work with a Brother HL-4150CDN network printer.
Install CUPS and Printer Drivers
We are using 64-bit Debian Wheezy. CUPS, the Common Unix Printing System, is a daemon that runs in the background, waiting for print jobs to be submitted. CUPS it’s highly network oriented.
Install CUPS. Not that if you don’t run as root, then you need to add sudo to both apt-get commands:
# apt-get update && apt-get install --no-install-recommends cups
Install pre-required transitional package to migrate ia32-libs to multiarch:
# apt-get install ia32-libs
Download LPR and cupswrapper drivers:
$ wget http://download.brother.com/welcome/dlf005940/hl4150cdnlpr-1.1.1-5.i386.deb
$ wget http://download.brother.com/welcome/dlf005942/hl4150cdncupswrapper-1.1.1-5.i386.deb
$ md5sum hl4150cdnlpr-1.1.1-5.i386.deb hl4150cdncupswrapper-1.1.1-5.i386.deb dd803993d4a29a432d63141201821b82 hl4150cdnlpr-1.1.1-5.i386.deb 81c3abd6b831f90301ed9117b28f291e hl4150cdncupswrapper-1.1.1-5.i386.deb
Install LPR and cupswrapper drivers:
# dpkg -i --force-all hl4150cdnlpr-1.1.1-5.i386.deb # dpkg -i --force-all hl4150cdncupswrapper-1.1.1-5.i386.deb
The CUPS IPP printing system is closely related to the HTTP used on a web. As our printer is connected to LAN (not via USB cable), we can open a web browser and navigate to
http://localhost:631/printers/ to configure it.
Click on a printer name and pick “Modify Printer”. A username and password may be requested as we’re entering the admin panel. It’s our root user’s credentials.
We need to to choose “LPD/LPR Host or Printer” for other network device.
Modify the connections string so it would look like
Add a description and location.
Use current driver.
Finish by clicking “Modify Printer” button. Try to print something. Printer’s status should change from “Idle” to “Processing”.
Edit CUPS Configuration
We can add a new printer or delete an existing one by modifying the
/etc/cups/printers.conf file. It contains definitions of existing printers:
# cat /etc/cups/printers.conf # Printer configuration file for CUPS v1.5.3 # Written by cupsd # DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING <Printer HL4150CDN> UUID urn:uuid:245d161f-c3c8-39ca-76ad-2b6aba9de0c1 Info HL4150CDN Location Main Desk MakeModel Brother HL-4150CDN series CUPS DeviceURI lpd://10.10.1.8/binary_p1 State Idle StateTime 1393610675 Type 8392780 Accepting Yes Shared No JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 OpPolicy default ErrorPolicy stop-printer </Printer>
Another way, the simpler one perhaps, is to modify printers by using a web-based configuration utility.