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.

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.
----------------------------------------------------------------------------------------------------------------

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!).

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.

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.

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.

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.

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

OK folks, here's the second part of my tutorial on how to install the Canon LBP2900i printer on Ubuntu 12.04 LTS

This second part deals with automating the re-setting of the printer every time you re-boot your computer into Ubuntu (incidentally, I think switching your printer off and on during a session will require a re-set as well. In which case you would need to employ the manual method described in section 1 of this tutorial using the “printer-reset.sh” file)

I should say, the following method was used by me after trying other methods I read in other tutorials for running an automated bash script that included the “sudo” command. They all indicated that each sudo command in the script should be prefixed with “echo yourpassword |” (where “yourpassowrd” is replaced by your actual password that you use to log in with).

However, this has never worked for me as the script, when run, has always still appeared in a terminal asking for the password. Obviously, if you need this script to run automatically, then having it come up and ask for the password is not what you want. I have since discovered how to disable the sudo password prompt completely so you are never asked for it. That way an automated script including the sudo command will not ask for it either.

The following steps show how to first disable the sudo password prompt and then how to get the printer to re-set automatically at boot-up.

Be warned, though (also see general caveat). Disabling your sudo password requires that you edit a very important file called the “sudoer” file and if you screw up while you are editing it, you can knacker your entire system and you will have to re-write it. I know this because I have done precisely that myself on a previous occasion. Furthermore, disabling your sudo passsword prompt is viewed by some as leaving your system less secure. However, I am less personally concerned about this than others and so I have no problem with disabling it. It's a matter of taste and risk-tolerance I guess. In any event, you still have to enter your password at boot-up.

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.
----------------------------------------------------------------------------------------------------------------

1) Open up a terminal. Type “sudo visudo” and press the “Enter” key. After typing in your password at the prompt, press “Enter”. You will be taken into something called the “sudoer” file.

2) Hold the down arrow key and you will see the cursor move to the bottom of the file. Paste the following line below all other lines (in order to paste using only the keyboard in a terminal, you need to press the CTRL/SHIFT/V keys simultaneously):

yourusername ALL=NOPASSWD: ALL

where “yourusername” should be replaced with your actual user-name (mine, for example, is “stephen”)

3) You now need to save and close the file. To do this you need to:

a) press CTRL and X
b) You will be prompted to type Y or N in order to save or discard the modifications. You must type Type Y
c) You will be given another prompt for the name that is given. Simply press the “Enter” key.

You should now find you have dropped out of the sudoer file and are back at the normal terminal prompt. That's it, you can close the terminal at that point

4) Using your menu, go to something called “Startup Applications”, In the classic gnome interface, this is under tools. In the unity interface, I would think it will come up if you type it into the search box on the dash. It looks like this:

6) For the Command, press the "browse" button and navigate to your “printer-reset.sh” file and choose it. For the Description, simply write "printer-reset" (or whatever you want) in the box.

7) Close the “add” dialogue box. You should now see this file listed as one of your start-up applications in the start-up-applications dialogue box. Close the start-up-applications dialogue box.

That's it. From now on, every time you start Ubuntu 12.04 LTS, this file will will run automatically, you will not be prompted for your password in a terminal and your printer will be ready to use immediately.

I hope this tutorial has been useful. If anything does not go as planned or expected, then please do write a reply in here and I will try and help if I can.

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

Dear Stephen,

after weeks of of horror while trying my LBP2900 to work, I found several useless guides on the web for this problem. Nothing was able to help. I even send an email to canon to ask them, what to do. but their answer was kind of: 'Your OS must be defective"...

Then, I found your instructions here...
...and, due to the perfect step-by-step description and the nice scripts, I was finally able to run my printer on Linux MINT 13!!!

Thank you for this and keep running your help to bloody new linux users like me...

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

Hai,
I have been trying to install canon LBP2900B laser jet printer in my lenovo desktop pc having ubuntu 12.04 Precise pangolin. I tried to install the driver from here https://help.ubuntu.com/community/Ca..._12.04_Install,but it wont work.There was no driver for 12.04 Precise pangolin. I followed all your directions in this post .After completing all steps , when I try to print , it shows a error message like this "There is a missing print filter for printer canon LBP 2900". Could you help me, please ?

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

Originally Posted by chandraubunt

Hai,
I have been trying to install canon LBP2900B laser jet printer in my lenovo desktop pc having ubuntu 12.04 Precise pangolin. I tried to install the driver from here https://help.ubuntu.com/community/Ca..._12.04_Install,but it wont work.There was no driver for 12.04 Precise pangolin. I followed all your directions in this post .After completing all steps , when I try to print , it shows a error message like this "There is a missing print filter for printer canon LBP 2900". Could you help me, please ?

Hello Chandraubunt

I am so sorry, but I am a new user to Ubuntu and so am only able to provide advice as it directly and specifically pertains to the printer and OS I have described in my post (LBP2900i). If any of the variables involved (printer or OS) differ from mine, any consequent advice I may give is likely to be worse than useless.

If anyone who comes across this thread has more in depth knowledge relating to Chandraubunt's specific problem please do feel free to add your knowledge to this thread in order to help him.

In any event, I wish you well and hope you are able to resolve your problem, Chandraubunt.

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

Originally Posted by absalypson

Dear Stephen,

after weeks of of horror while trying my LBP2900 to work, I found several useless guides on the web for this problem. Nothing was able to help. I even send an email to canon to ask them, what to do. but their answer was kind of: 'Your OS must be defective"...

Then, I found your instructions here...
...and, due to the perfect step-by-step description and the nice scripts, I was finally able to run my printer on Linux MINT 13!!!

Thank you for this and keep running your help to bloody new linux users like me...

Thank you for your kind words absalypson. I'm glad you got it running.

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

Originally Posted by stevecook

Hello Chandraubunt

I am so sorry, but I am a new user to Ubuntu and so am only able to provide advice as it directly and specifically pertains to the printer and OS I have described in my post (LBP2900i). If any of the variables involved (printer or OS) differ from mine, any consequent advice I may give is likely to be worse than useless.

If anyone who comes across this thread has more in depth knowledge relating to Chandraubunt's specific problem please do feel free to add your knowledge to this thread in order to help him.

In any event, I wish you well and hope you are able to resolve your problem, Chandraubunt.

Dear Stevecook,
Thank you very much for reply, I am eagerly waiting for a solution from this forum.