Amazon Kindle

A quick document explaining how to use the Amazon Kindle with Gentoo. This will detail some of the nuances I've encountered, and collecting information to a central WIKI location for users. Feel free to add material for your device or move the material as needed as I only have a DX Graphite.

Mounting using AutoFS
Execute blkid with the Kindle device attached.

Find the UUID from the blkid output and insert the following line into your "/etc/autofs/auto.misc" file, substituting UUID with your UUID:

Edit the "/etc/conf.d/autofs" file to your liking. Make sure you uncomment the MASTER_MAP_NAME="auto.master" line if you use the /etc/autofs/auto.master file!

For me, I use the following addition to the auto.master file. The "--ghost" option auto unmounts after five seconds:

Mounting using udev
The following rule will mount your Kindle using the Volume Name (ie. "Kindle" to (/media/Kindle"). You then will need to execute the user scripts "add.sh" and "remove.sh" to tell the Linux udev subsystem to add (mount) and remove (unmount) the device.  In turn, the "/media/Kindle" folder is automagically created and destroyed on mount and unmount.

Personally, I now prefer the AutoFS method as it's cleaner and I don't need to fiddle with running the above user scripts. The main problem I seem to run in with the Kindle DX is the DX's display stating the device is plugged in. Even though this is true, you can still unplug the device without using the "eject" command and the device is not mounted! And, using the "eject" command at times would confuse the device and the Linux sub-system at times. So, just unplug the device after checking the device is no longer mounted via the "mount" command. As such, much easier to just use AutoFS, as it can be configured to auto unmount it for you using the "--ghost" option.

File Format Conversions
I personally prefer using simple utilities for converting documents and the following will detail this.

PDF File Format
Best format to read technical documents is PDF.
 * You can create PDF's easily from printing them from Seamonkey or Firefox using the print to file method.
 * Use ps2pdf utilities (app-text/ghostscript-gpl)

MOBI File Format
The basis of this file format is HTML, but with the feature of DRM when required by publishers. Keep it simple, avoiding TABLE tag usage. (See Amazon's AmazonKindlePublishingGuidelines.pdf.)


 * Use VIM to convert a ASCII/UTF8 text file to HTML. Execute VIM's ":ToHtml" command and save, then use Amazon's kindlegen binary on the saved file. (KindleGen is Amazon's version of MobiGen.)

Free Books

 * Gentoo Wiki Articles can be printed to either PDF or HTML using the "Printable version" link, located to the bottom left within the "toolbox" of the viewable version of pages. (How about a link to download all Gentoo Wiki articles tar.gz|bz2 file?  This would make a great secondary backup option for Gentoo Wiki!)


 * Many C Programming books, specifications and manuals are already freely available in PDF format. (ie. C on Freenode lists many freely available recommended books)


 * Many FSF GNU Manuals are also already available in HTML and PDF formats.


 * Manual Pages (AKA manpages) can be easily converted to HTML, then MOBI using KindleGen. (See References Below)


 * TLDP hosts many HowTo's and documents in PDF and HTML formats.


 * Python hosts it's documentation in PDF, HTML and EPUB formats.


 * Would be great to have to download only one file containing all the above, so a user would only need to download and untar one file to their reading device for their reading pleasure and/or studying. In practice, it takes several days to weeks to download and move the above material to the reading device.

Mobile Linux Websites

 * Lxer News (Mobile Version)

External resources

 * Amazon Publishing Programs KindleGen Program and AmazonKindlePublishingGuidelines.pdf
 * Amazon Kindle DXG and Linux
 * Amazon Kindle - Converting .txt to .html to .mobi
 * Amazon Kindle - Convert Linux Manual Pages to .mobi
 * Amazon Kindle - Strip