Fixing Amazon’s Kindle Previewer in El Capitan

For some reason getting Amazon’s Kindle Previewer to work on El Capitan is not an easy task. There are a few resources online that pointed in the right direction but didn’t fully solve the problem for me. Here is what worked for me, extracted from the Amazon forums‎.

Amazon Kindle Previewer

1. Install X11 and Java for OSX


2. Open the Launcher shell script with a text editor

The Launcher file is located in /Applications/Kindle

Go to Finder → Applications → Kindle, right click the file, Show package contents → Contents → MacOS → Launcher, right click the file, Open with → other, choose TextEdit or your favorite text editor.

3. Edit the Launcher file

First add the following line below #!/bin/sh:

export JAVA_HOME="/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home"

Then replace the two occurrences of java -d32 with ${JAVA_HOME}/bin/java -d32.

The new file should look like this:

export JAVA_HOME="/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home"

dir=`dirname "$0"`
cd "$dir"

for i in `ls ./lib`


# start the previewer
fileExtT=`echo $1 | awk -F. '{print $NF}'`
fileExt=`echo $fileExtT | tr '[:upper:]' '[:lower:]'`

if [ "$fileExt" == mobi -o "$fileExt" == azw3 -o "$fileExt" == epub -o "$fileExt" == opf -o  "$fileExt" == html -o  "$fileExt" == zip ]
    # opens only the first book in command line.  TODO: handle multiple books in command line
    ${JAVA_HOME}/bin/java -d32 -XstartOnFirstThread -Dfile.encoding=UTF-8 -cp "${classpath}" "$1"
    exit 1
    ${JAVA_HOME}/bin/java -d32 -XstartOnFirstThread -Dfile.encoding=UTF-8 -cp "${classpath}"
    exit 1

4. Save the changes

You are done.

If you still run into issues it could be that a java process or a previous Kindle Previewer process is still running in the background and preventing the changes from taking effect. Kill the zombie processes (in the terminal or restarting your computer), and things should work now.

Good luck!

Maruja Mallo and the Quest for Mathematical Harmony

I learnt my love for conceptual art and iconography from Maruja Mallo (also my love for opera but that’s another story.) Maruja was the 4th unrecognized member of the “Student Residence” with Dali, Lorca and Buñuel in the Madrid of the ’20s. She camouflaged herself among the Surrealists, but she was really figurative, geometric and always very precise in her art.

Early in her career Maruja painted the working man and woman, transforming what she saw through lens of geometry and elevating this reality to iconographic status.


In her Tratados Armonicos (literally “Harmonic Treatises”) Maruja expresses her love and search for order, harmony and symmetry.


In her own words:

Nature is what began to attract me, to discover a new order. Order is the intimate architecture of nature and man, the living mathematics  of the skeleton.

In nature—clairvoyant and mysterious, spontaneous and structured, devoid of anachronistic ghosts—I analyze the structure of minerals and vegetables, the diversity of crystalline and biological forms synthesized in numerical and geometric patterns, in a living and universal order…

While in the exile in South America she continued this quest for mathematical harmony as it can be observed in her series of heads.


Maruja Mallos’ talent was recognized very late in life, particularly by the younger generations who welcomed her back in Spain  during the transition to democracy after Francisco Franco’s death in 1975.

Life in this planet is Art, Science or War.
—Maruja Mallo



Maruja in Spanish:

La naturaleza es lo que empieza a atraerme, hallar un nuevo orden. El orden es la arquitectura intima de la naturaleza y del hombre, la matemática viviente del esqueleto.En la naturaleza clarividente y misteriosa, espontánea y construida, desprovista de fantasmas anacrónicos, analizo la estructura de los minerales y vegetales, la diversidad de formas cristalinas y biológicas sintetizadas en un orden numérico y geométrico, en un orden viviente y universal…

La vida de este planeta es Arte, Ciencia o guerra.