Results 1 to 10 of 44

Thread: How to install the Canon LBP2900i printer in Ubuntu 12.04 LTS

Threaded View

  1. #1
    Join Date
    Oct 2011
    Beans
    30

    How to install the Canon LBP2900i printer in Ubuntu 12.04 LTS

    Hi folks. My name is Steve Cook. I'm a newcomer to Ubuntu. I have been using it for three months now. The first two and a half months of which was on Ubuntu 10.04 LTS and the last two weeks on Ubuntu 12.04 LTS.

    I own a Canon LBP 2900i printer. Installing it on Ubuntu 10.04 LTS was a bleeding nightmare. But I managed it in the end. I had to install a start-up bash-script to re-set the printer every time Ubuntu started up (more on that later). But, once done, it worked fine.

    I have had a similar issue in Ubuntu 12.04 LTS. I am about to describe how I got it to work in Ubuntu 12.04 LTS. My description is aimed at new users like myself and so I will, no-doubt, be seen to be excessively labouring some things for the more experienced user. Regarding such experienced users, my apologies in advance.

    One other thing, it probably doesn't have any relevance, but I did all of the following from the “Gnome-Classic” shell in Ubuntu 12.04 LTS. I merely mention it for completeness. I don't see any reason why it shouldn't work in exactly the same way in the “Unity” shell.

    ------------------------------------------------------------------------------------------------------------------
    Caveat

    You may feel free to copy my actions to get your Canon LBP 2900i printer to work on your own PC. However, you do so at entirely your own risk. I strongly urge you to save any important files from your “file system” drive to either another drive/partition or to a removable media. If you screw up on on anything and mess your system up, it is your own responsibility.
    ----------------------------------------------------------------------------------------------------------------

    Here is precisely how I got the printer to work in 12.04:

    1) Download the printer driver from the link below:

    https://github.com/raducotescu/Canon...tarball/master

    You should get this dialogue window. Choose to open with “Archive Manager”

    (click on the image link and it should appear in a new window)
    http://i958.photobucket.com/albums/a...ter-driver.png

    It is in a zipped-up format called a "tar". Once downloaded, it should automatically open up in the program called "Archive Manager" (or. if you initially saved it instead, you can double click after it has downloaded and it will then open up in Archive Manager). For those who are brand new to this kind of thing, once it has opened in Archive manager, you could do what I did and extract the folder containing the package of scripts to your user-name folder. This is the same folder that you will automatically start in when you open a terminal (more on this later).

    Once extracted, navigate your way to your home folder (which is the same folder as your username........just to confuse matters!).

    (click on the image link and it should appear in a new window)
    http://i958.photobucket.com/albums/a...ome-folder.png

    Once there you will see a new folder (the one you just extracted) called "raducotescu-CanonCAPTdriver-c8ea9f9". Double click the folder and inside there is a "README" file which you should read. It tells you how to run the bash script to install the driver. You have to do this from a terminal. Essentially, what you do is click on the terminal icon from the accessories menu. The terminal will open in your home folder.

    (click on the image link and it should appear in a new window)
    http://i958.photobucket.com/albums/a...1/terminal.png

    To test if you are in your home folder, if you type:

    ls

    it will list all of the files and folders inside your home folder. One of the folders listed will be the one called "raducotescu-CanonCAPTdriver-c8ea9f9".

    (click on the image link and it should appear in a new window)
    http://i958.photobucket.com/albums/a...s-terminal.png

    Type:

    cd raducotescu-CanonCAPTdriver-c8ea9f9

    to go into the folder. If you again type:

    ls

    you should see the following files:

    canonLBP_install.sh
    canonLBP_uninstall.sh
    changelog
    DEBS
    LICENSE
    README

    When you sure you are are in the correct folder, you can then use the command that is given in the README file for running the correct script. It is:

    sudo ./canonLBP_install.sh LBP2900

    You will be prompted for password (the same one you use to log into Ubuntu). Type in your password and press the "Enter" key.

    But, I also urge you to read the instructions fully in the README file as well as simply following my instructions here

    Assuming all went well, above, the next step is:

    2) Getting the printer to work!

    Assuming your printer is on, if you tried to print a document at this point, if would just hang in the print queue and would not print. This next step is what you need to do to make it actually work. It involves making something called a bash script.

    You first need to open a text editor. In the gnome-shell you can open one up from “accessories/gedit”. In the Unity shell I think it may just be called “text editor”, though I am not certain.

    Once opened, paste the following code into it:

    #!/bin/bash
    sudo modprobe usblp
    ls -l /dev/usb/lp0
    sudo -S lpadmin -x LBP2900-2
    sudo /etc/init.d/ccpd restart
    sudo /etc/init.d/cups restart

    This code is is telling Ubuntu to:

    a) search for and make active the physical connection to the printer
    b) get rid of a second and unwanted printer that was created in the installation process (don't ask me why it was created, I don't know and care even less)
    c) restart the printer drivers

    Don’t worry if you don't understand the specific syntax of the code (neither do I). Just know that it works!

    Once you have pasted the code, save the file to your home folder as “reset-printer.sh”

    Then open up a terminal and type:

    ls

    You should see the file “reset-printer.sh” in the list of files and folders.

    Now type the following to make the file executable:

    chmod +x reset-printer.sh

    Congratulations, you have just written your first bash script!

    This script will be need to be used each time you start Ubuntu to make your printer work.

    To do this, close the terminal and then navigate your way to your home folder. You will again see the “reset-printer.sh” file.

    Double-click the file. A dialogue box will appear:

    (click on the image link and it should appear in a new window)
    http://i958.photobucket.com/albums/a...1/run-exec.png

    Choose to “Run in terminal”

    The terminal will appear and again prompt you for your sudo password (this is the same password you use to log into Ubuntu) Type your password in and press the "Enter" key.

    At this point, your printer should now be working.

    You can test this by opening your word processor and typing something into it and then printing the document. At the print dialogue box, you may or may not see the second printer mentioned earlier. I'm not sure why it is sometimes there and sometime not. But no matter, it is not set as the default and doesn't seem to affect anything. The one you are using is set to default and so you don't need to change anything. Just press the print button and it should work.

    I should note, the very first time you try this, there is a small possibility it might not work. If that happens, re-boot your machine, re-set the printer again with the "reset-printer.sh" file and it should be OK. From then on in, you should find it works every time.

    From now on, the first thing you will need to do after you have logged onto Ubuntu is to go to your home folder and double-click the “reset-printer.sh” file and then choose to run it in a terminal as before, type in your password, hit the enter key and you printer will be good to go for the rest of your session.

    You may well be happy enough to stop reading this tutorial at this point and simply re-set the printer manually like I have described every time you log onto Ubuntu. If, however, you are a nerd like me and are unsatisfied with having to do the above and would prefer for it to automatically happen every time Ubuntu loads so that it all feels more seamless and invisible, then please read my next section of this tutorial on how to automate the resetting of the printer using the same “reset-printer.sh" file you have just created. I'll be posting it up here tomorrow.

    I'd do it now, but it's late, I'm knackered and I'm off to bed.
    Last edited by stevecook; July 1st, 2012 at 09:18 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •