Amazon Kindle

A quick document explaining how to use the Amazon Kindle with Gentoo.

Kernel
To be able to mount your Kindle as an external storage device, you require the VFAT file system as well as support for DOS partition tables in your kernel.

Mounting using AutoFS
Execute blkid with the Kindle device attached.

Find the UUID from the blkid output and insert the following line into your file, substituting UUID with your UUID:

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

The following addition to the file can be used. The --ghost option auto-unmounts after five seconds:

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

The AutoFS method may be preferred, as it's cleaner and doesn't need running the above user scripts. The main problem with the Kindle DX seems to be 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
Simple utilities for converting documents can be used, as shown below.

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

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.)

Tips

 * When possible, copy both the MOBI and PDF file formats to the device as both currently have separate pros and cons (e.g. O'Reilly publishes books into a multitude of formats).
 * Because there are so many files freely available, create subfolders within the folder even though the Kindle DX Graphite firmware doesn't display the folders, but will see the files within the folders.  Then use the Kindle firmware to create a "Collection" with a similar name to the folders (e.g. Filesystem folder name, Collection Name "Programming - C").

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.
 * Many C Programming books, specifications and manuals are already freely available in PDF format (e.g. 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 its documentation in PDF, HTML and EPUB formats.

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