How to get a Canon all-in-one printer working with Ubuntu
Posted by admin on March 30th, 2008
Email This Post
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
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.



March 30th, 2008 at 3:20 pm
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
March 30th, 2008 at 9:06 pm
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.
April 1st, 2008 at 3:43 am
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
April 6th, 2008 at 9:24 pm
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.
April 6th, 2008 at 11:22 pm
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.
September 28th, 2008 at 2:32 pm
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?
September 29th, 2008 at 12:31 pm
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
October 17th, 2008 at 4:34 am
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