Linux Apps for Kindle

There is a very lightweight package manager OptWare (or NSLU2-Linux) designed to be integrated on top of embedded linuxes. The repository's binary packages can be installed on Kindle. To install OptWare on Kindle, you will have to create a large file with ext3 filesystem within the file, which is then mounted to a directory. The full details are in the OptWare wiki page.

Unless you are going to installed a lot of packages from the repository, it is not necessary to install OptWare. You can simply download the binary packages you want to install, and then manually copy the required files to Kindle.

The list of binary packages that can be downloaded are in this link http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/

I downloaded the Vim package (powerful text editor). The packages are using ipk format.

An .ipk file is a gzipped tar archive containing 3 members:
data.tar.gz
control.tar.gz
debian-binary

In Linux, you can rename the ipk file as a tar.gz file, and proceed to extract the contents.
The control.tar.gz contains a file named control, which has the meta-data for this package. It may also contain scripts used for installation purpose. The meta-data is useful for checking dependencies on other packages.
The data.tar.gz contains the actual binary files to be installed.

The Vim data.tar.gz extracts to the paths below under the /opt dir.
/opt/bin
/opt/share

The Kindle OS / dir is by default read-only, and is also inaccessible via the Kindle drive.
I have created the "local" folder under the Kindle drive. (In Kindle OS, this folder is at /mnt/us/local)
Copy the extracted bin and share folders under the Kindle drive "local" folder.
However, symbolic links are not supported in vfat file system, which is the file system used by Kindle drive.
Only 3 files in the bin folder can be copied over, they are vim, vimtutor and xxd. The rest are symbolic links.

Once, myts terminal is launched, just type vim to run the Vim editor. The PATH env already contains /mnt/us/local/bin , set via the myts profile.



I also downloaded tmux package. Basically, it is a terminal window manager that allows you to run multiple terminals in the same terminal window. (See A tmux tutorial)

Tmux has a dependency on libevent that is not present in the default Kindle OS, so we need to download libevent package as well.

For tmux, only tmux (under /opt/bin) needs to be copied to Kindle drive local/bin. The /opt/share contains only man pages which are not needed.

libevent package extracts to the paths /opt/bin , /opt/include and /opt/lib . (/opt/include is not needed)
Copy the extracted bin and lib folders under the Kindle drive "local" folder. Symbolic links in the lib folder cannot be copied over.

under Kindle drive local/lib:
libevent-2.0.so.5.1.7
libevent_core-2.0.so.5.1.7
libevent_extra-2.0.so.5.1.7
libevent_openssl-2.0.so.5.1.7
libevent_pthreads-2.0.so.5.1.7

As tmux is looking for libevent-2.0.so.5 , so I rename the files to: (those used in the original symlinks)
libevent-2.0.so.5
libevent_core-2.0.so.5
libevent_extra-2.0.so.5
libevent_openssl-2.0.so.5
libevent_pthreads-2.0.so.5



Although I like my Kindle keyboard model, I find it a bit ugly since the keys take up a lot of space and its rarely being used when reading books. But, now with myts terminal and vim installed, the keyboard has become very useful and very much needed! (I wonder what Amazon is thinking of for the usage of the keyboard)


Related:
Terminal Emulator for Kindle

Comments

blog comments powered by Disqus