Monday, May 28, 2012

Kindle reader on Ubuntu

Previous: Ultralight notebook: Apple, Asus, or Toshiba?

Amazon provides no Kindle reader for Linux. I want my shiny new Toshiba Portege to support all my road warrior needs. I don't want to have to carry a separate device for reading Kindle books. My Android phone has a Kindle reader app, but the phone isn't really a great platform for reading.

Prowling around online, I came across a solution. The basic solution is to run Amazon's free Kindle reader for Windows under wine. There are a couple of issues, though.

The first issue is that the current version of the Kindle reader will not run under wine at all. At http://okomestudio.net/biboroku/?p=931 I found a solution devised by a frustrated Kindle subscriber who kindly keeps a copy of an early beta version of the Kindle reader on his website. To get his stuff, run these commands:

sudo apt-get install wine lib32nss-mdns cabextract bzip2
wget http://www.kegel.com/wine/winetricks
sh winetricks corefonts
wget http://okomestudio.net/biboroku/wp-content/uploads/2010/06/KindleForPC-installer.exe.bz2
bunzip2 KindleForPC-installer.exe.bz2
wine KindleForPC-installer.exe
When you run the installer, you might encounter this error:
wine: Call from 0x7b839f22 to unimplemented function msvcp90.dll.??0?$
After a fair amount of hunting, I found an entry on a wine forum at http://appdb.winehq.org/commentview.php?iAppId=1485&iVersionId=22127&iThreadId=71627 that explained the error is caused by an obsolete manifest entry that is not needed for recent versions of wine. To get rid of it, run this command:
rm ~/.wine/drive_c/windows/winsxs/manifests/*.vc90.*_deadbeef.manifest
Once I did that, I was able to run the Kindle reader and access my Kindle books normally.

Next: Some thoughts about the Windows 8 preview release

Ultralight notebook: Apple, Asus, or Toshiba?

Previous: Ubuntu upgrade 11.10 to 12.04

Recently signed a relatively long (6 month) contract that will require considerable air travel. Rather than lug my 18.4" Toshiba laptop on airplanes, I decided to get one of the ultralight laptops with an SSD drive. I'm not worried about the relatively low capacity of the SSD drive, as I will continue to use the larger laptop as my primary machine when I'm not traveling. Based on a quick perusal of online reviews, the best products in the category appeared to be the Apple MacBook Air, Asus Zenbook, and Toshiba Portege, so I limited my investigation to those three.

These three products are comparable in features, form factor, battery life, and price (within a couple hundred dollars for models with 128GB SSD drives). Each has it own particular advantages.

The Apple has the best display resolution, and the Thunderbolt port is interesting as it promises about 20x the transfer speed of USB 2.0, which is very handy for those of us using small external HDDs for local backups. But Linux does not (yet) support the Thunderbolt interface, so that feature was moot in my case. Besides, not many external devices support Thunderbolt at this time. By all accounts everything else on the Apple can be supported in Linux, although there are a few post-installation tweaks to do.

The Asus has a reasonable number of USB ports - 2 USB 2.0 and 1 USB 3.0. Since I use the keyboard heavily in my work, I wanted a unit that had a decent feel for typing. Although I plan to use an external keyboard whenever I'm stationary, I expect there will be many occasions when all I have with me is the base unit. The Asus keyboard feels a bit cramped to me, and it invites fat-fingering multiple keys or wrong keys when typing rapidly.

The Toshiba has three USB 2.0 ports and no USB 3.0 port. The lack of USB 3.0 support is not really a show-stopper for me. The keyboard is okay, and display resolution is adequate - at 1366x768 it's not quite as high as the Apple's 1440x900, nor my larger laptop's 1680x946, but it seems fine. When I'm stationary, I'll be using an external monitor anyway.

In recent months, I've started to use virtual machines to create special configurations for particular projects or for specialized client work. I find it a pretty convenient way to run different OSes and try out different development tools without cluttering up a single system with all kinds of configurations that might conflict with one another. It also alleviates fear, as I can't write code that will wreck the kernel of the host machine when I'm working on a VM. So I was interested in a machine that had VT-x support in the BIOS as well as the chipset so that I could run 64-bit guest VMs. Although my large Toshiba Satellite laptop is a 64-bit machine, the BIOS does not provide a way to enable VT-x and I am limited to 32-bit guest VMs.

Many laptop makers do not seem to see any point in supporting VT-x in the BIOS, even if the chipset supports it. Fortunately, both the Apple and the Toshiba ultralights support this. It's hard to tell from the literature about the Asus whether it supports VT-x or not. Because this isn't a popular, consumer-oriented feature, most of the sales literature about these products just doesn't mention it one way or the other. Instead, they talk about how easy it is to sync photos from your phone or watch movies. Not really my usage pattern.

Long story short, I went with the Toshiba Portege for its relatively good keyboard and otherwise-reasonable balance of features. First time I turned it on, I had a bootable USB stick with Ubuntu 12.04 inserted, and went directly to the BIOS menu to set USB memory as the first boot device. Then restarted it and installed Ubuntu. Never even gave the pre-installed Windows system a glance.

I was pleased to see that Bluetooth worked. I haven't had any luck with Bluetooth support on Toshiba laptops with Ubuntu previously. It's good that they have this working now. Transferring data with a cable is okay, but wireless is more convenient. And that's one less cable to stuff into my carry-on bag. Ubuntu 12.04 seems to have a few glitches here and there, but on the whole Ubuntu just keeps getting better with each release. I didn't have to go searching for scripts and downloads to work around anything this time. Nice, clean, easy install.

Next: Kindle reader on Ubuntu