Wednesday, April 20, 2011

Using Amazon Kindle reader under Wine on Linux

(updated ... see below)

In an effort to expand my interests outside of plain old computers, I have decided to see what it would be like to try reading some books again.  I was thinking of buying a Kindle from Amazon.com, but I already have a netbook (eee PC 900A running Gentoo Linux) and really don't want to have another portable device that may or may not get used.

Amazon.com unfortunately doesn't have a Kindle for Linux, so the best I figured I could do was to install the Kindle for PC (which really should be named Kindle for Microsoft Windows...because PCs can run other operating systems) using Wine, which is an open source software package that allows some Windows applications to run natively on Linux (or other UNIX-like operating systems).  I quickly discovered that this was a bit more difficult than it needed to be due to some documentation issues.

So here's how to get this done, as of April, 2011:
  1. Download the Kindle for PC installer from www.amazon.com
  2. On whatever flavor of Linux you like, install wine - be sure that it is at least version 1.3.0.  I am using 1.3.9 and it is working well.  Since version 1.3.9 is not the accepted stable version on Gentoo yet, you will need to edit your /etc/portage/package.keywords file to contain this line prior to doing an "emerge wine":

    =app-emulation/wine-1.3.9         ~amd64 ~x86

    This tells portage to allow this version of wine to install, even though it isn't the tested stable version.  Additionally, I used the following "use flags" in package.use (you may wish to use others, but this is what works for me):

    app-emulation/wine      alsa jpeg truetype

    The one that is likely important for you will be "truetype" as an earlier attempt got wingding fonts in some places (yuck!).
  3. Configure your wine set-up, if you haven't already using winecfg.  Other people say you need to emulate Windows 98 when you're running the Kindle application, but I have not found this to be necessary anymore.
  4. Place the Kindle installer file (KindleForPC-installer.exe) into the wine drive_c directory.
  5. Run the installer (wine 'c:\KindleForPC-installer.exe').  Once you're finished installing the Kindle software, then you can remove the installer.
  6. Using winefile, you can navigate down to the location of the Kindle software and run it.  This is at C:\Program Files (x86)\Amazon\Kindle For PC\KindleForPC.exe
    .  I'm sure there is a way to create a shortcut for this, I just haven't done anything with it yet.
I registered fine with my Amazon account, and was able to read the sample books it included.  I haven't tried anything else yet, but I will soon.

Those who are running other distributions of Linux, such as Ubuntu, should simply be sure that they are running a 1.3.x release of wine.  It doesn't work on 1.2.x, I have tried it.  So don't waste your time doing that.  You can still run the beta Kindle reader with 1.2.x (if you can find the beta), but that isn't a really good long-term solution.

It would be better if Amazon would simply supply a statically-linked (so it'll work on any distribution and/or version of Linux) Kindle reader binary for Linux.  Even better would be to make it open source, but, as I understand it, the problem here has to do with digital rights management and copyright issues for the books, and they feel this is the only way to deal with that for now.

Happy reading!

Update 1:  wine version 1.3.2 does not work, so don't use that one either. Version 1.3.9 doesn't work on my eee PC with an Intel Atom N270 processor (it does work on other platforms, including my laptop with a Celeron-M processor).

wine version 1.3.6 works on my eee PC, so that's the version I now recommend using.  I will continue testing and update the rest of the text with this information if it continues to work.

1 comment:

ewamjlu said...

Thanks for the instructs! I think if you just create a shortcut to the .exe file itself, Linux should automatically load Wine to run it.

Peace!

Mitch