No Comments

Installing a printer in Linux

Uncategorized

This article is directed at absolute newbies to Linux — Ubuntu, in particular.

When I first fired up Ubuntu, it recognized and was ready to print to my DYMO Label Writer Twin Turbo, Epson Stylus C86 and the HP Photosmart Express supplied by a client (don’t ask … it’s a long story on its own).

The DYMO and HP were connected via USB.

Do NOT send the test page image to the Label Writer!

That left me with a Brother MFC440-CN doorstop.

It, and the Epson, were connected via Ethernet cable. The Epson has been fitted with an external ethernet adapter, the Brother was purchased with one built in. As mentioned earlier, the Epson was present and accounted for as soon as the operating system came to life after the install.

So … it having been a long time since I fooled around with installing printers on Linux, I started by going to the Brother web site. Probably 90% of the time this works. At present, Linux accounts for roughly 10% of the desktop market and manufacturers are loathe to give 10% of their sales to any one else. Although a bit convoluted, I was able to follow the Brother instructions and, roughly an hour later, my final printer was working.

Hey Brother … don’t mix your instructions up between LSP and non-LSP installs on the same page. And it wouldn’t hurt for you to post the command line that I am going to show below and save us all a bunch of grief. It’s a command line, for cryin’ out loud … it’s not copyrighted.

But today, researching this article, I began with a search on Google for “Brother MFC440-CN Linux” and had to go no further than here.

Hey, that’s even easier than breaking the CD seal, agreeing to the draconian EULA terms and then following the bouncing ball for twenty minutes while some software makes a ton of unseen changes to your system in Windows.

And I think it’s valid to point out that being able to install hardware with very little fuss is an important advantage Linux offers to desktop users. You won’t have to reboot every time you add or remove a device because Linux is just a little smarter than Windows.

To open the terminal (or ‘dos box’) in Ubuntu, go to the menu listing for Applications –> Accessories –> Terminal. Other end-user oriented distributions of Linux will be similar, although not all will have ‘aptitude’ (the installation program you are actually using with the command shown) available.

Breaking down the command we will be using we find:

sudo = telling Ubuntu that you have the authority to install software. You’ll get a chance to prove it in a moment.

aptitude = the program being run. If you don’t have the aptitude to install software yourself, aren’t you glad that there is a program available that does have it? ;-)

install = what you want that program to do

brother-cups-wrapper-bh7 = the script file that contains the necessary instructions to make directories, etc. When the script file exits, it will dump you back out to the terminal. The lines below are the output you will see whizzing by as the script executes (if you are familiar with *.bat files, think of this as a dos batch file on steroids).

So, open a terminal, type in sudo aptitude install brother-cups-wrapper-bh7 and press the enter key.

You will see something like this flash before your very eyes:

bill@bill-laptop:~$ sudo aptitude install brother-cups-wrapper-bh7
[sudo] password for bill: (you will have to supply this information yourself)
Reading package lists… Done
Building dependency tree
Reading state information… Done
Initializing package states… Done
Writing extended state information… Done
Building tag database… Done
The following NEW packages will be automatically installed:
a2ps brother-cups-wrapper-common brother-lpr-drivers-bh7
brother-lpr-drivers-common csh psutils wdiff
The following packages will be automatically REMOVED:
mfc440cncupswrapper mfc440cnlpr <— these are the packages I had manually installed. They are being replaced with newer versions.
The following NEW packages will be installed:
a2ps brother-cups-wrapper-bh7 brother-cups-wrapper-common
brother-lpr-drivers-bh7 brother-lpr-drivers-common csh psutils wdiff
The following packages will be REMOVED:
mfc440cncupswrapper mfc440cnlpr
0 packages upgraded, 8 newly installed, 2 to remove and 0 not upgraded.
Need to get 2401kB of archives. After unpacking 8933kB will be used. <– fair warning if you have dial-up or are cramped for disk space
Do you want to continue? [Y/n/?] y (hit the ‘enter’ key to continue, as “Y” is the default choice)
Writing extended state information… Done
Get:1 http://us.archive.ubuntu.com hardy/main psutils 1.17-24build1 [84.8kB]
Get:2 http://us.archive.ubuntu.com hardy/universe a2ps 1:4.14-1 [915kB]
Get:3 http://us.archive.ubuntu.com hardy/multiverse brother-lpr-drivers-common 1.0.0-3-0ubuntu1 [746kB]
Get:4 http://us.archive.ubuntu.com hardy/universe csh 20070713-1 [245kB]
Get:5 http://us.archive.ubuntu.com hardy/multiverse brother-cups-wrapper-common 1.0.0-10-0ubuntu3 [7742B]
Get:6 http://us.archive.ubuntu.com hardy/multiverse brother-lpr-drivers-bh7 1.0.1-1-0ubuntu1 [352kB]
Get:7 http://us.archive.ubuntu.com hardy/multiverse brother-cups-wrapper-bh7 1.0.0-10-0ubuntu3 [16.0kB]
Get:8 http://us.archive.ubuntu.com hardy/main wdiff 0.5-17build1 [33.7kB]
Fetched 2401kB in 16s (148kB/s)  <– the above 8 steps have downloaded the needed software. Since it completed successfully, it is now safe(er) to delete the older files already in use.
(Reading database … 163682 files and directories currently installed.)
Removing mfc440cncupswrapper …
lpadmin: The printer or class was not found. <– not an issue / heirloom software
* Restarting Common Unix Printing System: cupsd                         [ OK ]
Removing mfc440cnlpr …
Selecting previously deselected package psutils.
(Reading database … 163661 files and directories currently installed.) <– and ALL free of charge
Unpacking psutils (from …/psutils_1.17-24build1_i386.deb) …
Selecting previously deselected package a2ps.
Unpacking a2ps (from …/a2ps_1%3a4.14-1_i386.deb) …
Selecting previously deselected package brother-lpr-drivers-common.
Unpacking brother-lpr-drivers-common (from …/brother-lpr-drivers-common_1.0.0-3-0ubuntu1_i386.deb) … <– “unpacking” = “unzipping”
Selecting previously deselected package csh.
Unpacking csh (from …/csh_20070713-1_i386.deb) …
Selecting previously deselected package brother-cups-wrapper-common.
Unpacking brother-cups-wrapper-common (from …/brother-cups-wrapper-common_1.0.0-10-0ubuntu3_i386.deb) …
Selecting previously deselected package brother-lpr-drivers-bh7.
Unpacking brother-lpr-drivers-bh7 (from …/brother-lpr-drivers-bh7_1.0.1-1-0ubuntu1_i386.deb) …
Selecting previously deselected package brother-cups-wrapper-bh7.
Unpacking brother-cups-wrapper-bh7 (from …/brother-cups-wrapper-bh7_1.0.0-10-0ubuntu3_i386.deb) …
Selecting previously deselected package wdiff.
Unpacking wdiff (from …/wdiff_0.5-17build1_i386.deb) …
Setting up psutils (1.17-24build1) …
Setting up a2ps (1:4.14-1) …

Setting up brother-lpr-drivers-common (1.0.0-3-0ubuntu1) …
Setting up csh (20070713-1) …

Setting up brother-cups-wrapper-common (1.0.0-10-0ubuntu3) …
Setting up brother-lpr-drivers-bh7 (1.0.1-1-0ubuntu1) …
Setting up brother-cups-wrapper-bh7 (1.0.0-10-0ubuntu3) …
Setting up wdiff (0.5-17build1) …

Reading package lists… Done
Building dependency tree
Reading state information… Done
Reading extended state information
Initializing package states… Done <– why Ubuntu won’t need rebooting to install a printer driver
Writing extended state information… Done
Building tag database… Done
bill@bill-laptop:~$ <– the script is finished and has returned control to you

BTW, the prompt says that I am bill, that I am logged in to the machine known as bill-laptop (a Toshiba A105 series), that I am currently working from my home directory (”~” = /home/bill) and that I am logged in as an unpriveleged userd (”$” = normal user, “#” = root / admin user). Normally, the best policy is to operate as a normal user whenever possible because ‘root’ can do some truly horrible things to a system that the normal user can not get permission to do.

Then, in your browser, type http://127.0.0.1:631

You will have to supply your user name and password. Then go to Manage Printers and make the Brother Printer active.

Done. Print the test page if you wish.

No EULA. No CD to store/lose/scratch. As Ubuntu gets upgraded, so will the printer drivers. From your perspective, it will happen automatically.

Bill Canaday @ July 21, 2008

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Blog counter