Ubuntu Geek

Ubuntu Linux Tutorials,Howtos,Tips & News | Gutsy,Hardy,Intrepid

  • RSS Feed

    subscribe to the ubuntu Geek RSS feed

  • Follow Us on Twitter

  • Sponsor


  • Categories

  • Meta

  • Sponsor

  • Archives

  • Support Ubuntugeek

    Amount $:
    Website(Optional):


  • Favourite Sites

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

Posted by admin on March 30th, 2008 Email This Post Email This Post

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

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.

Share/Save/Bookmark

Related Articles

8 Responses to “How to get a Canon all-in-one printer working with Ubuntu”

  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 :D

  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. Onno Benschop Says:

    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. Onno Benschop Says:

    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

Leave a Reply

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>