Zim_on_Mac_OSX

Zim is an amazing app (see my demo). Unfortunately, there is not yet a simple click-and-install option. Instead, installation requires use of the terminal.

Current as of 2019-01-03, MacOS Mojave.

Zim 0.69.1 and homebrew

  1. download and install Xcode from App Store (optional: minimal install)

  2. open terminal and install homebrew package manager by pasting the following

    /usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

  3. install python2 and package tools if necessary

    brew install /usr/local/bin/python2 -m pip install –upgrade pip setuptools wheel virtualenv

  4. install GTK+ if necessary

    brew install gtk-mac-integration pygobject gtk+ pygtk libffi brew install wget –with-libressl

  5. get source of latest Zim

    mkdir ~/bin; pushd ~/bin; wget http://zim-wiki.org/downloads/zim-0.69.1.tar.gz tar xvfz zim-0.69.1.tar.gz rm zim-0.69.1.tar.gz

  6. setup virtualenv

    pushd zim-0.69.1 /usr/local/bin/python2 -m virtualenv –system-site-packages –python=python2 env pip2 install pyenchant pyxdg pip2 install pygtkspellcheck

  7. use Zim

    source ~/bin/zim-0.69.1/env/bin/activate python2 ~/bin/zim-0.69.1/zim.py deactive

  8. set your preferred browser by alt-clicking on a link and configuring

    /usr/bin/open -a “/Applications/Google Chrome.app”

  9. increase font size in ~/.config/zim/style.conf

    [TextView] font=Arial 17

Creating an Zim.app file

I don’t bother creating a Zim.app, but Romain Schmitt recommends the following.

  1. Run Platypus and edit the profile as follows:

    App Name : Zip Script Type : bash Script Path: …

  2. For Script Path, select New and then paste:

    #!/bin/bash //2.7.15_2/bin/python2 ../Resources/zim-0.69/zim.py

  3. Click Save

  4. For Bundled Files, click + and then select the path where zim-0.69.1 is located. If you follow this tutorial, it will be in ~/bin/zim-0.69.1.

  5. You can also select an icon for the zim.app; make the sure the three options box on the right are unchecked.

  6. Click Create App, then save it to the folder Applications.

  7. Quit Platypus.

Virtualenv after python upgrade

After a python version upgrade, your virtualenv symlinks may no longer work. If so, try this in your zim directory to delete the symlinks and recreate them. find ~/bin/zim-0.69.1/ -type l -delete /usr/local/bin/python2 -m virtualenv –system-site-packages –python=python2 env