I’ve been waiting and watching the eReader world for some time now, waiting for the price (for a half decent product) to drop below about £100. The Kindle 3, starting at £109, was close enough for me to preorder one – although I actually ended up being swayed by the allure of the 3G version at £149.
While waiting for it to arrive I installed the Calibre eBook manager on my Ubuntu 10.04 (Lucid Lynx) system from the repositories and went trotting off to download a bunch of out-of-copyright classics. The new Kindle arrived yesterday, so I plugged it into my machine, fired up Calibre, told it to send the eBooks to the reader… and got an error message.
The problem is that the Kindle 3 is supported on the latest version of Calibre (0.7.16) but of course the version in the Ubuntu repositories is far older than that (0.6.42). Even the version in the Maverick repository is too old (0.7.13). One obvious answer would be to download the source of the newest version from the Calibre site and build it myself, but where possible I prefer to stick to software from the official repositories so that I get automatic updates.
A bit of googling resulted in the answer in this forum thread: the changes to support a Kindle 3 are fairly trivial and only occur in one Python file, so it’s very easy to modify an installed 0.6.42 version. When Ubuntu pushes updates I’ll simply tell it to keep my modified file until they push a version >0.7.16, and which point I’ll let it get replaced with the official repository version.
So for anyone in a similar situation, here’s the step-by-step guide to getting the version of Calibre in the Ubuntu Lucid repositories to support a Kindle 3:
- Install Calibre from the Universe repository using your package manager of choice. You can click on this link and open with “apturl” to achieve the same effect: apt://calibre
- Press ALT-F2 to bring up a “Run Application” dialogue.
- Copy and paste the following line into that dialogue:
gksudo gedit /usr/lib/calibre/calibre/devices/kindle/driver.py
- Enter your password when prompted and you should see “gedit” (text editor) open with the file ready for editing.
- Scroll to the bottom of the file.
- Copy and paste the following code at the end of the file:
class KINDLE2(KINDLE): name = 'Kindle 2/3 Device Interface' description = _('Communicate with the Kindle 2/3 eBook reader.') FORMATS = KINDLE.FORMATS + ['pdf'] PRODUCT_ID = [0x0002,0x0004] BCD = [0x0100]
- Save the file and quit “gedit”.
- Launch Calibre from the Applications=>Office menu and start managing your eBook collection for your Kindle 3.
Note that I’m no Python programmer, but my reading of the code suggests that this change might stop Calibre working with a Kindle 2 as it appears to override the existing KINDLE2 class. So if you’ve got both a Kindle 2 and a Kindle 3 and want to use Calibre with both you’re probably better off downloading the latest version and building from the source.
[Edit: Kevin Philp has added a comment which contains the code to support both the Kindle 2 and 3; the code above has been updated accordingly. Note that as I only have a Kindle 3 I haven't been able to test this, so please do comment if this does or doesn't work for you]