Build OpenNX on OS X 10.9 (Mavericks)

by cs

Update 14th Nov 2013: Keyboard mapping works fine when NoMachine’s NX server is used instead of FreeNX.

Update 10th Nov 2013: Turns out that the OpenNX 0.16.725 dmg works on Mavericks after a re-install – no reason to go through these instructions unless you want to build a 64-bit version. They keyboard mapping bug is still present though.

Update 9th Jun 2014: Use x2go instead. Works on Mavericks without any problems.

The OpenNX dmg that you can get from the downloads section doesn’t work on OSX 10.9. Here are some instructions to get it to run on OS X with MacPorts. It’s still very buggy and the incredibly annoying keyboard issue is still present so that these notes are more of a starting point to fix OpenNX in future revisions.

    1. Install MacPorts (don’t forget to install XCode and the Command Line Tools – these prerequisites are somewhat hidden on MacPorts’ installation page).
    2. Install some dependencies:
      sudo port install wxWidgets-3.0 curl libidn openssl zlib nxcomp libpng jpeg svn2cl cctools libtool autoconf automake pulseaudio
    3. Get the OpenNX source code:
      cd ~
      svn checkout -r 724 svn://svn.code.sf.net/p/opennx/code/trunk opennx-svn
    4. Get and apply a patch to build with MacPorts:
      cd opennx-svn
      wget https://gist.github.com/neurodroid/7388754/raw/b1d9837388f0650047930c6a010714f3c3305b36/opennx-osx.patch
      patch -p0 < opennx-osx.patch
    5. Get and build nxssh:
      cd ~/opennx-svn/opennx
      wget http://64.34.173.142/download/3.5.0/sources/nxssh-3.5.0-2.tar.gz
      tar -xzf nxssh-3.5.0-2.tar.gz
      cd ~/opennx-svn/opennx/nxssh
      CPPFLAGS="-I/opt/local/include -I/opt/local/include/nx" LDFLAGS="-L/opt/local/lib -L/opt/local/lib/nx -lresolv" ./configure --prefix=/opt/local
      make -j4
      cd ..
      mkdir -p bin
      ln -s nxssh/nxssh ./bin/nxssh
    6. Build OpenNX:
      cd ~/opennx-svn/opennx
      make -f Makefile.am
      ./configure
      make -j4
    7. The application should end up in ~/opennx-svn/opennx/OpenNX.app. If you get a lengthy error message that boils down to an issue with nxssh, make sure that your system NX path points to ~/opennx-svn/opennx in OpenNX’ configuration settings

Screen Shot 2013-11-09 at 19.09.47