Tag Archives: fix

Ubuntu and My Canon LiDE 100 Scanner Personal Musings 19 DEC 2010

At last, I’ve finally gotten my Canon LiDE 100 Scanner to operate under Ubuntu thanks to the excellent work from the outstanding SANE and some dedicated forum answer masters.

One of the reasons for my little scanner not getting as much action over the course of this year as what I might have liked it to was the fact that no Linux drivers were available for it, meaning that it would only work on my Windows XP laptop, the machine most seldom used in my house.

However, thanks to the instructions I have lovingly saved up on CodeUnit for future reference, the little fighter is now operating at full speed, having already allowed us to publish the little ink footprints of Jessica for the world to see.

Nice! :)

Related Link: http://www.codeunit.co.za/2010/12/19/ubuntu-and-the-canon-lide-100-scanner-fix/

Ubuntu and the Canon LiDE 100 Scanner Fix CodeUnit 19 DEC 2010

Earlier this year I treated myself and purchased a Canon LiDE 100 USB Scanner (which ashamedly hasn’t seen all that much use for the rest of the year). As much as I like the little low cost fighter, one of my biggest gripes was that Canon hadn’t released any Linux drivers for the device, and because the code is proprietary, it wasn’t likely to get Linux support any time soon.

Well thankfully all of that has now changed and the wonderful SANE project has gone ahead and added driver support for the Canon LiDE 100… though getting it to work requires a little bit of effort on your part!

First, you need to grab the relevant USB libraries. So open up a terminal and enter:

sudo apt-get install libusb-dev build-essential libsane-dev

Next, grab the SANE backends from GIT. To do this, you need git-core, so:

sudo apt-get install git-core

Using the installed GIT, grab the necessary SANE backends with the following command:

git clone git://git.debian.org/sane/sane-backends.git

This grabs the necessary backends and puts them in a folder called sane-backends located in your home folder. Now switch to this directory and compile:

cd sane-backends
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
sudo make install

Note that the make command might take a while to complete. Anyway, now that everything is installed, only root can currently scan, so we’ll need to change this with some permissions:

sudo gedit /lib/udev/rules.d/40-libsane.rules

Add the following 2 lines to the bottom of the file:

# Canon CanoScan Lide 100
ATTRS{idVendor}==”04a9″, ATTRS{idProduct}==”1904″, ENV{libsane_matched}=”yes”

Save your changes, close gedit and reboot your machine.

And hey presto, all of a sudden Xsane picks up your scanner and you are back in business. Nifty! :)

(Tested on a installation of Ubuntu 10.10 Maverick Meerkat)

WordPress Fix for Schedule Missed Posts CodeUnit 23 DEC 2009

After upgrading successfully to WordPress 2.9 the other day, I was mortified to find that all of a sudden all of my scheduled posts were being missed one after the other, and the only solution to actually force publish them was to hit the Quick Edit option on the posts listing page and change the each post’s status to published.

Needless to say, this is rather unacceptable.

Thankfully though, there is a fix for this particular problem, one that doesn’t involve installing a new plugin but rather depends on you editing one of WordPress’ internal files.

Now if we ignore the fact that your web host has suddenly and inexplicably gone and disabled your WordPress cron, we can assume that the problem lies in the cron (or scheduled task if you are from the Windows world) itself. As you might have noticed, WordPress seems to be getting slower and slower with each release, which is pretty natural when you think about just how much extra bells and whistles the developers keep having to throw at it in order to keep the ravenous horde that are its followers happy.

However, this could be exactly where the problem lies. If you go and locate the WordPress internal file /wp-includes/cron.php, opening it up and running a search for wp_remote_post should bring up a line looking something like this:

wp_remote_post( $cron_url, array(‘timeout’ => 0.01, ‘blocking’ => false, ‘sslverify’ => apply_filters(‘https_local_ssl_verify’, true)) );

(Hint: it’s around line 229 in a standard WordPress 2.9 config file)

If you look closely at the function call being carried out, you’ll notice that a timeout value of 0.01 seconds is being passed to the function, which is coincidentally exactly where the problem lies – the remote post is being adjudged to have timed out and thus aborted before it could actually run its job properly!

So the solution?

Well it is a simply matter of increasing that relatively small number of 0.01 to something more generous, like 20 seconds for example, meaning that the updated string should now look like this:

wp_remote_post( $cron_url, array(‘timeout’ => 20, ‘blocking’ => false, ‘sslverify’ => apply_filters(‘https_local_ssl_verify’, true)) );

Obviously you then need to save your changes and upload the saved file back to the server in order for it to be activated.