How to get a Canon all-in-one printer working with Ubuntu

Sponsored Link
These instructions are for Canon all-in-one printers (printer, scanner, and copier in one unit). These instructions are for the Canon PIXMA MP160, but these instructions can be adapted for other all-in-one printers in the Canon PIXMA series of all-in-one printers. This is done entirely in the terminal. All terminal commands are in boldface.


You need the necessary compiling tools, so if you haven't already done so, open a console and enter the following command

sudo aptitude install libgtk2.0-dev libxml2-dev gettext libnss-dev libnspr-dev libgtkspell.

This will download all the necessary dependencies.

Download the printer and scanner drivers from here. You will need to download the following files :

cnijfilter-common-2.80-1.i386.rpm

cnifjilter-mp160-2.70-1.i386.rpm

scangearmp-common-1.00-1.i386.rpm

scangearmp-mp160-1.00-1.i386.rpm

Download these files to your home directory.

You will now need to download Alien so you can convert the .RPM files into .DEB files. Install alien using the following command

sudo aptitude install alien

To convert the .RPM files into .DEB files

sudo alien -d *.rpm

To install the printer drivers

sudo dpkg -i cnij*.deb

To install the scanner drivers

sudo dpkg -i scan*.deb

sudo aptitude install libpng3

sudo ln -s /usr/lib/libtiff.so.4 /usr/lib/libtiff.so.3

sudo /etc/init.d/cupsys restart

cd /usr/share/cups/model/

sudo lpadmin -p MP160 -P canonmp160.ppd -v cnij_usb:/dev/usblp0 -E

sudo apt-get install libxml1

Now you have the printer completely installed.

Now we need to get the scanner completely installed. To do this, we need to install the scanner back-end.

Download the sane scanner back-end from here. Save it to your home directory.

Uncompress the downloaded file using the following command
tar -xvjf mp150-0.13.1.tar.bz2

cd mp150-0.13.1

make

sudo make install

(if asked to overwrite any files, choose Yes)

Turn on your Canon all-in-one printer, do a complete restart (not a simple log-out), and log back in. To test your scanner, place something in your scanner and open XSane by clicking Applications -> Graphics -> XSane Image Scanner. To scan, click on the Scan button. Don't forget to set the scan resolution to your liking.

Sponsored Link

You may also like...

15 Responses

  1. fox88 says:

    i though that you would say something like:
    plug the power cord
    plug the usb cable
    turn the Canon ON
    wait 2 seconds
    you’re done 😀

  2. Jerad says:

    Odd. Seems the MP160 is the only driver available for Linux. I have an MP470 (which is limping along with the MP150 driver right now), and neither are available for download on that site.

  3. This is in my opinion very poor advice:
    “(if asked to overwrite any files, choose Yes)”

    The whole point of a packaging system such as used by Ubuntu is to avoid that. Overwriting files will cause all manner of issues with existing installed software.

    If overwriting is required then as the person providing this advice you should investigate specifically which files need to be overwritten. You then need to investigate which packages provide those existing files. Finally, you need to determine why they need overwriting in the first place.

    Just choosing “Yes” in this scenario is asking for problems from a maintenance and a support perspective.

    Just for example.

    Let’s say that I actually followed your advice to answer “Yes” to overwrite some file somewhere.

    Now I run a system update which updates a package which owns that file. The file that was replaced is either detected and the update fails, or it’s not detected and overwritten by the update.

    Now you have a problem.

    The updated/overwritten file is now either from the updated package or the software that you just installed to make the printer work. Best case scenario, you still have a working system, worst case scenario is that your system no longer works or boots.

    Finally, just downloading “stuff” from somewhere and installing it with “sudo” is asking for your computer to be compromised.

    –Onno

  4. Gianluigi says:

    It worked for me (Canon MP210).

    Though I downloaded mp150-0.14.4.tar.bz2 from canon.com.au (first link in the post)
    and before invoking “make install” I renamed:

    /usr/lib/sane/libsane-pixma.so.1.0.18
    to
    /usr/lib/sane/libsane-pixma.so.1.0.18.old

    Finally, as I read it on another , I also added:

    # Canon PIXMA MP210
    SYSFS{idVendor}==”04a9″, SYSFS{idProduct}==”1721″, MODE=”664″, GROUP=”scanner”

    to /etc/udev/rules.d/45-libsane.rules

    and reloaded the rules with:

    sudo udevcontrol reload_rules

    The MP210 scanner works just fine with Xsane.

  5. In case you’re interested, the files you modified are owned by the following packages:
    /etc/udev/rules.d/45-libsane.rules = libsane
    /usr/lib/debug/usr/lib/sane/libsane-pixma.so.1.0.18 = libsane-dbg

    So, if either of those two packages is ever updated – which is already the case between Gutsy and Hardy, your printer is likely to stop working.

  6. pablo says:

    Hi, thanks for the tutorial. Unfortunately I got a message “lpadmin: Bad device-uri “cnij_usb:/dev/usblp0″”.

    This occurred at the step: sudo lpadmin -p MP160 -P canonmp160.ppd -v cnij_usb:/dev/usblp0 -E

    Could you shed a light?

  7. Mary says:

    Hi,
    Thanks for the information. Anyway I have to say that I’ve come across the same exact problem as Pablo. The terminal won’t recognize or find such a directory or file as lpadmin.
    What should I do?
    Thanks!
    Mary

  8. Emil says:

    Hi;

    Pablo and Mary Just ignore the bad device and continue with the installation process. You printer should work on the next restart.

    Also, its worth noting that with Kubuntu and Ubuntu 8.04.1 the scanner works right off the box using gscan2pdf.

    I’ve done numerous installs with different versions of Ubuntu and Kubuntu and the only problem I’ve had is adjusting the resolution from 600dpi to 300dpi or less and getting it to print on draft mode.

    Good luck.
    Emil of Mawmag

  9. Mary says:

    Hi Everyone
    I just gave it a thought that it might be far easier to look for a printer that is compatable with LINUX. So, I figured on browsing the webusing google search. All I want is just to pop the cd in the drive and then all it does is installs without going through all the prompt commands.

  10. Jason Argonaut says:

    Very complete explanation, thanks.
    Unfortunately I have amd64 & the shell script bombs @ i386.
    I’ve been whacking away @ Canon all-in-one MX320 for several days, no luck :-(.

  11. Jason Argonaut says:

    Update: I discovered all I really needed was the PPD file, which I used to install through CUPS+gutenprint. Thanks everyone.

  12. santacruz says:

    Thanks it works for me.

    I know why it does not work at first because I forgot the file cnifjilter-mp160-2.70-1.i386.rpm.

    Now printer is working for me. Thanks again!

    Santacruz

  13. watersnail says:

    I just started with ubuntu 11. I followed your first instruction:
    sudo aptitude install libgtk2.0-dev libxml2-dev gettext libnss-dev libnspr-dev libgtkspell

    But the next line prompt me with password:

    What must I do next?
    Thanks.

  14. nathan says:

    Hello,

    I just found this site today, searching for a driver(s) for my, Canon Pixma Mp495 all-in-one printer, and this was a good start, all though there seemed like there was a bit to do, it’s not.
    Go to this website (sameWebSite as above):— >

    http://support-au.canon.com.au/P/search?model=PIXMA+MP495&menu=download&filter=0&tagname=g_os&g_os=Linux

    , and click on the driver thats the closest to your printer.

    After you download the file,

    1. Open a command promp, and change to the dir where you saved the file.–> cd (where-ever file is located)

    2. When in dir of downloaded file, —> cd to programs or where-ever the files are located with-in dir, then type:
    —> sudo dpkg -i *.deb (if using the Debian system 10 or greater )

    —-> if its done right, dpkg will do its thing, installing all libraries and such and from there on all you need to do is add your printer thru ubuntu—> System, Administration,printing <— when finished print a print test by, right-clicking the printer image, properies, clicking on settings then down to your left, to process a print test to check printer setup.

    Hopefully it works for guys, worked for me.
    Good Luck!

  15. Asim says:

    Nathan’s suggestion worked perfectly on Ubuntu 11 for my Canon MF4570dn multi-function printer.

    Thanks,
    Asim

Leave a Reply

Your email address will not be published. Required fields are marked *