[ Prev ] [ Next ] | Open Codex Zim wiki by Joseph Reagle.

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)"

  1. install python2 and package tools if necessary

brew install python@2
/usr/local/bin/python2 -m pip install --upgrade pip setuptools wheel virtualenv

  1. install GTK+ if necessary

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

  1. 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

  1. 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

  1. use Zim

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

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

/usr/bin/open -a "/Applications/Google Chrome.app"

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

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: ...

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

/usr/local/Cellar/python@2/2.7.15_2/bin/python2 ../Resources/zim-0.69/zim.py

  1. Click Save
  2. 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.
  3. You can also select an icon for the zim.app; make the sure the three options box on the right are unchecked.
  4. Click Create App, then save it to the folder Applications.
  5. 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

© 2014-2019 Joseph Reagle. Please reuse and share! Creative Commons License