Fix bad for loop variable canon linux driver

→ Are you a new visitor? Please visit the page guidance for new visitors ←

Fix bad for loop variable Canon linux driver

I got recently a help from a friend regarding a specific letter and it seems it was needed to have the Canon printer driver installed. It was the first time using it and I gave him the perfect chance to test it out. He was using a Canon mg2250, however the linux drivers appear to be working on a all mg2000 series. Also the process to install the driver appears to be the same on all other printer models, just needs the proper driver version.

Download Canon linux driver

In our case I found that the drivers needed could be downloaded from here:

Using a link shortening service since its pretty long one. Anyway, you should just go here:

and get the proper driver for your Canon printer.

Install printer driver on linux

Once we have our driver downloaded, we should normally untar it, you can use the below commands:

First issue 64 bits

Now normally you should not have any issues from here and the process to install your printer should be seen. However, if you are on a 64 bits linux, you will have to first edit the file and replace:

with the following:

This will allow you to install the drivers on your 64 bits system. The drivers by default are made to work only on 32 bits linux system.

Second issue bad for loop variable

Now if you are using Ubuntu, seems like they handle the for() constructor a bit different, if you do not make the file executable, the for loop will give an error:

The solution to this is to either make the file executable and then run it:

or to use the bash command to run the file:

You should be able to see at this point a similar result:

Some of you may not be able to see the printer name when trying to print, however it should work if you choose the generic printer which should definately be present there.

That’s it for today, will see you again in another tutorial.


Request an article ←