Month: December 2015

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

Downloads:

2. Open the Launcher shell script with a text editor

The Launcher file is located in /Applications/Kindle Previewer.app/Contents/MacOS/Launcher.

Go to Finder → Applications → Kindle Previewer.app, 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:

#!/bin/sh
export JAVA_HOME="/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home"

dir=`dirname "$0"`
cd "$dir"
classpath=./:./lib/touchLibs/etc/fonts/fonts

for i in `ls ./lib`
do
    classpath=$classpath:./lib/$i
done

export DYLD_LIBRARY_PATH=.

# 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 ]
then
    # 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}" com.amazon.epub.reader.Main "$1"
    exit 1
else
    ${JAVA_HOME}/bin/java -d32 -XstartOnFirstThread -Dfile.encoding=UTF-8 -cp "${classpath}" com.amazon.epub.reader.Main
    exit 1
fi

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.

maruja-mallo-la-religion-del-trabajo.jpg

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

maruja-mallo-naturaleza-viva.jpg

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-mallo-heads.jpg

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-mallo-portrait.jpg

 

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.