RKWard on Mac

From RKWard
Revision as of 13:53, 24 October 2012 by M-eik (Talk | contribs)

Jump to: navigation, search

This page has been marked as needing an improvement. This means the page is incomplete, badly structured or otherwise in need of significant improvements.



Allthough access to a Mac is still limited for the main contributors, as of version 0.6.0, there is a pre-compiled ready-to-install bundle for Mac OS X >= 10.7. We want to encourage you to send feedback to our mailing lists, be it success stories or bug reports, because without it is hard to continue support for this operating system in the future!

Please take the information below as a guide through the required steps. If one of the steps is unclear, or simply does not work, let us know, and we will find a solution.

Installing using the precompiled binary bundle

We've used the MacPort of RKWard to precompile a .dmg archive which includes KDE, R and RKWard , currently only for Mac OS X Lion (10.7) or above. This bundle is still rather huge, but it has been tested and is reported to run on various machines. A screencast of the installation is available here.

NOTE: If installing on OS 10.8 Mountain Lion, you will need to either disable Gatekeeper in the Security & Privacy control panel by setting "Allow applications downloaded from:" to "Anywhere", or by right-clicking the installer and selecting "Open."

If you test this bundle package, please send us feedback, be it a short success notice or a bug report. We rely on this simple feedback for the further development of this port!

Installing from source using MacPorts

The MacPorts project seems to offer the more up-to-date KDE packages for MacOS, so at the moment it is considered the preferred method over fink (see below). However, it will install an Aqua based version of KDE, and as of now, RKWard will not be able to capture the graphic devices. That is, most of RKWard's advanced graphics features are missing here, as they still lack support for Aqua. The rest of the application should be fully operational, though. A screencast of the process is available here.

When is this preferable over the binary bundle?

Because the bundling process currently involves a lot of manual steps, we can only release new binary bundles every now and then. If you need or want to check out the latest development version of RKWard, e.g., to test new features or fixes, installing the latest port is the preferred method for Mac users. However, you should not mix both installation types, allthough the bundle should not interfere with MacPorts in general.


  1. Install the MacPorts software. As the instrunctions tell, you need XCode installed as well. When you do or try to upgrade, make sure no previous installation of XCode is lying around, because it can mess up the build with confusion about the gcc compilers available. A symptom for this might be failing builds of certain ports later on. Look for old "/Developer-X.Y" entries and check if you need to remove them, e.g.:
    sudo /Developer-3.2/Library/uninstall-devtools --mode=all   # be aware that this will *uninstall* XCode 3.2 completely!
  2. As of now, the rkward portfile is under development and not yet available as an official part of MacPorts (meaning: this is the bleeding edge approach!). Therefore, you need to tell MacPorts to use it nonetheless manually. Open a terminal and follow these steps:
    1. Create a new directory for the portfile, e.g.
      mkdir -p /Users/<your_username>/software/ports/
    2. Get the recent portfile and create the neccessary portfile index:
      cd /Users/<your_username>/software/ports/
      svn co http://rkward.svn.sourceforge.net/svnroot/rkward/trunk/rkward/macports/ .
    3. Add this portfile location to the MacPorts configuration. This example uses the nano editor, but of course any other text editor will do, too:
      sudo nano /opt/local/etc/macports/sources.conf
      Find the line containing "rsync://rsync.macports.org/... [default]", and add this line directly above that:
    4. And finally, update your port database:
      sudo port selfupdate

All further needed software packages (KDE and R) will be installed with the RKWard port automatically, so you should need no additional preparations.

Building RKWard

This step should take only one command in a terminal, but a lot of time to finish (depending on your CPU, it could even take days!):

sudo port -v install rkward-devel

Running RKWard

If the compilation and installation finished successfully, you should now find RKWard in your Applications menu, filed under MacPorts.

Note: Before you can start any KDE software, you first need to run the following commands once:

sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist

Installing using fink (obsolete)

As of 0.6.0, the development of RKWard for Mac is focused on MacPorts, as it features newer KDE ports and allows us to provide binary packages, too. If possible, please give that a try first! Only if MacPorts is not an option, you might find the following guide useful, allthough it's most likely outdated by now.


  1. You need an existing installation of R (2.9.0 or higher). http://www.r-project.org/ has binaries for MacOS, and you will likely use the latest available binary installer.
  2. For KDE4, follow this procedure (taken from http://mac.kde.org):
    1. Install Fink: http://www.finkproject.org/download/index.php
    2. Open a Terminal
    3. Enable the "unstable" distribution:
      fink configure
    4. Update Fink:
      fink selfupdate      # This will take a while to complete
    5. Finally, install kdelibs and some needed packages. Currently it is important to use the X11 versions, RKWard will not work with the native versions, yet:
      fink install kdebase4-x11        # This will take a *long* time to complete
      fink install svn                 # if you do not have svn, already


  • Fink also provides an R package, but this seems to be very old, thus it is recommended to install the official binary from http://www.r-project.org, as detailed above. After installation, you should have a console version of R at /usr/bin/R .

Building RKWard

Next fetch the latest SVN sources:

 svn co http://rkward.svn.sourceforge.net/svnroot/rkward/trunk rkward_trunk

The remainder of the process should work as detailed at Building RKWard From Source. These commands will hopefully do the trick:

 cd rkward_trunk/rkward;  # the directory with the svn checkout
 mkdir build; cd build
 . /sw/sbin/kde4-buildenv.sh    # this sets some environment variables needed for building; we assume your fink base is "/sw".
 cmake .. -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix`
 sudo make install

This should be all!

Running RKWard

For some reason fink places the KDE binaries in a rather hidden place, which is not in the path by default. If you have done everything as described above, rkward will be at



Again: Some detail or other of the above instructions is probably just wrong. If / when you get an error, please don't give up. Send us a mail, and we will talk you through. BTW: If you figured out the remaining details all by yourself: Great! But please drop us a note as well, so we can provide more accurate instructions in the future.

RKWard crashes on start

Possible solution no. 1: Your KDE setup is probably not ready, most likely dbus is not running. Before you can start any KDE software, you first need to run the following commands once:

sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist

Possible solution no. 2: You had installed R from another source before, RKWard picks the wrong one and doesn't find its own R package(s). If possible, remove the older R installation first.

Language is always english

Possible solution: If the LANG variable is not set in the environment RKWard is started, you will always get the english interface. To change that, e.g. into german, you can also use launchctl, before you start RKWard:

launchctl setenv LANG de_DE.UTF-8

This setting takes effect immediately, but won't survive a reboot. A more permanent solution is to set this environment variable for your user account by creating or adding to the file ~/.MacOSX/environment.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
Personal tools