A quick document explaining how to use the Amazon Kindle with Gentoo.
Kindle DX / DX Graphite
Mounting the Removable Storage Media
Mounting using AutoFS
Execute blkid (sys-apps/util-linux) 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!
The following addition to the auto.master 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 (/media/Kindle). You then will need to execute the user scripts add.sh and remove.sh to tell the udev to add (mount) and remove (unmount) the device. In turn, the /media/Kindle 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 (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.)
- 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 /mnt/kindle/documents 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 /mnt/kindle/documents/programming-c, Collection Name "Programming - C").
- 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
- 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