Last modified 8/29/2006.
This document describes how you can run CourseForum or ProjectForum under Mac OS X either from a command line, or so that it automatically starts running when your system starts up. This is in contrast to the normal method of running with a user interface, and may make more sense in some environments.
If you're comfortable with using Terminal, its easy to get CourseForum or ProjectForum running from the command line. The application on OS X is an 'application bundle', which contains a daemon (command line) version. To run it from Terminal, use a command like either:
nohup /Applications/CourseForum.app/Contents/MacOS/courseforum-server &or:
nohup /Applications/ProjectForum.app/Contents/MacOS/courseforum-server &
When doing this, you need to make sure your working directory is set to the directory where your data files are stored, i.e. "~/Library/Application Support/CourseForum", or "~/Library/Application Support/ProjectForum".
Note: The command line program's name is "courseforum-server" for both CourseForum and ProjectForum.
Use launchd (described here) for OS X 10.4 or later.
Starting with OS X 10.4 (Tiger), Apple introduced a system-wide daemon called "launchd", which provides a unified facility for managing automatically run processes. For Unix geeks, think of it as a one-size-fits-all replacement for cron, rc.d, init, and more. There are several good launchd overviews available on the Internet.
To run ProjectForum via launchd, which will ensure it starts up when the machine first boots, and is automatically restarted in case it ever stops, follow these steps. You'll need to perform these steps using 'sudo' from the Terminal.
Use StartupItems (described here) for OS X 10.3 or earlier.
Under versions of OS X previous to Tiger (10.4), StartupItems are used to run programs when the system first starts up. This allows them to be started even without someone logging in to the computer, or to stay running across different users.
Here are the steps needed to create a StartupItem. In this example, we'll do this for ProjectForum, though CourseForum would be similar. We'll be storing the data in the directory /usr/local/projectforum, and we'll be running ProjectForum as the 'root' user (the normal case for programs run as StartupItems).
NOTE: Because StartupItems require special permission, you will need to perform these steps using 'sudo' from the Terminal.
#!/bin/sh . /etc/rc.common # This script will start up ProjectForum ConsoleMessage "Starting ProjectForum" export HOME=/usr/local/projectforum cd /usr/local/projectforum nohup /Applications/ProjectForum.app/Contents/MacOS/courseforum-server -nologo -port 3455 &
{ Description = "ProjectForum"; Provides = ("ProjectForum"); Requires = ("Portmap"); OrderPreference = "None"; }