This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / Getting Started / Network SysAdmin Guide / The Mathematica License Manager / Starting and Stopping MathLM /

5.2.3 On Mac OS X

You may start MathLM manually at any time using the command-line options listed in Section 5.3. However, it is also possible to configure MathLM so it starts automatically when the system is rebooted. There are two ways to do this:

  • Create a cron entry to start MathLM at a specified time or interval, such as once a day or once a week. If a mathlm process is already running, the new process exits.

  • Write a startup item for MathLM. Startup items are programs (such as shell scripts) that are run during the last phase of booting a Mac OS X system. They can be configured to perform tasks such as clearing away temporary files or starting system daemons.

The following example shows the steps involved in creating a startup item for MathLM. You can find detailed information on creating startup items at the following URLs:

To configure MathLM to start automatically when a Mac OS X machine boots up:

1. Create a directory called MathLM in /Library/StartupItems.

2. In /Library/StartupItems/MathLM, create a file called MathLM with the contents shown below. The name of the file must be the same as the name of the directory.


. /etc/rc.common


# This script will start up the Mathematica License Manager, mathlm.


if [ "${MATHLM:=-YES-}" = "-YES-" ]; then

ConsoleMessage "Starting the Mathematica License Manager"

/usr/local/Wolfram/MathLM/mathlm -pwfile



ConsoleMessage "The Mathematica License Manager was not



3. Change permissions on the file to make it executable.

chmod 555 MathLM

4. In the same directory, /Library/StartupItems/MathLM, create a file called StartupParameters.plist with the following contents:


Description = "Mathematica License Manager";

Provides = ("MathLM");

Requires = ("Network", "Resolver");

OrderPreference = "Late";

Messages = {

    start = "Starting Mathematica License Manager";

    stop = "Stopping Mathematica License Manager";



5. Change permissions on the file, as shown below.

chmod 444 StartupParameters.plist

6. Edit the /etc/hostconfig file, and add the following text in the Services section:


7. Restart the server.