User Interface Overview

screenshot

Note: LaunchControl will present alerts before most actions to avoid accidental modifications. All of these alerts may be disabled. To re-enable all of them select Help>Re-enable all safety dialogs.

The Job Panel

Job categories

LaunchControl supports five different categories of jobs:

Name Location Run on behalf of
User Agents ~/Library/LaunchAgents Currently logged in user
Global Agents /Library/LaunchAgents Currently logged in user
Global Daemons /Library/LaunchDaemons root or the user specified with the key 'User'
System Agents /System/Library/LaunchAgents Currently logged in user
System Daemons /System/Library/LaunchDaemons root or the user specified with the key 'User'

Select the desired category from the category popup.

Some categories hold a large number of jobs. You may filter the list using the Job Name Filter or the Job Attribute Filter (Cmd-Opt F). Note: On a fresh install of OSX the category User Agents is empty.

The job definition file name

The first column the names of the job definition files. The extension (.plist) is omitted. The color the file name is displayed in represents its validation status.

Color Validation status Description
Black Ok Every aspect of the jpb definition is ok. The job should run just fine.
Yellow Warning There are one or more minor problems with this job definition. A warning will not keep the job from running. It just might not behave as expected.
Red Error There is a severe problem with the job definition. launchd(8) will not be able to start this job.

Note: The colors in this column do not reflect the run-time status of a job.

Enabling/Disabling a job

The checkboxes in the second column indicate if a job is enabled or not. An enabled job will be loaded automatically on system boot (daemons) or login (agents). The check mark indicates if the Disabled key of the job definition has been set to true (not checked) or false (checked). The background color indicates if this setting has been overridden with true (red) or false (green).

If a checkbox is grey, the status of the checkbox will tell you if the job is enabled or not. If a checkbox is green, the job is enabled no matter what the checkbox status indicates. If a checkbox is red, the job is disabled no matter what the checkbox indicates.

Checked Color Description
No Grey The jobs Disabled key is not set or false. The job is effectively disabled and will not be automatically loaded by launchd(8).
Yes Grey The jobs Disabled key is set to true. The job is effectively enabled and will be automatically loaded by launchd(8).
No Green The jobs Disabled key is not set or false, but this value is ignored as it has been overridden. The job is effectively enabled and will be automatically loaded by launchd(8).
Yes Green The jobs Disabled key is set to true, but this value is ignored as it has been overridden. The job is effectively enabled and will be automatically loaded by launchd(8).
No Red The jobs Disabled key is not set or false, but this value is ignored as it has been overridden. The job is effectively disabled and will not be automatically loaded by launchd(8).
Yes Red The jobs Disabled key is set to true, but this value is ignored as it has been overridden. The job is effectively disabled and will not be automatically loaded by launchd(8).

Clicking on a check box will set the jobs Disabled key. Use the Job>Override Disabled Key to change the override.

Note: Don't confuse this with the job state. Just because a job is enabled does not mean that the job is loaded or even running and vice versa.

Job state

The third column displays the job state. A job is either loaded or unloaded. Loaded jobs may have the following sub-states:

State Description
Ok In case it has been already executed, is has returned successfully.
Running It is currently being executed.
Error <CODE> It has been executed and it returned an error. The return code is provided in the status column.
SIG<NAME> It has been executed and it terminated with the signal given in the status column.

A job may also be in state 'Unknown'. In this case LaunchControl was either unable to parse the job definition file or it could not find the job label. Possible reasons for the first case might be that LaunchControl was unable to read the file due to insufficient permissions or due to a malformed job definition.

Renaming a job definition file

Double-click on the name in the list. You can edit the name inline. The extension (.plist) is appended automatically.

Note: Job definition files cannot be renamed while there are unsaved modifications.

Adding/Removing a job definition

Clicking the '+' button in the lower right of the job list section will create an empty job skeleton of the currently selected job category. Clicking the '-' button next to it will move the currently selected job definition to the trash. You may recover accidentally removed job definitions as usual.

The Editor Panel

LaunchControl provides two edit modes. The default mode provides custom controls for every documented key supported by launchd(8). Using this mode will guaranty that the resulting job definition is valid. The default mode also validates the configuration options you provide. It discovers problems immediately, even before you run the job. If, for example, you provide the key Program, LaunchControl will check if the program exists and if it is executable. If Program is a relative path, LaunchControl will check for the key WorkingDirectory. If this key is set, LaunchControl will assume the program is in this directory. It also considers the keys User and Group when evaluating the permissions. It performs as many checks as possible to ensure that the job definition is valid before you load it into launchd(8).

The expert mode does not restrict you in any way. It allows you to use any key of any type you want. You should rarely need this mode, but it might be useful when using some of the undocumented features of launchd(8).

You can switch between these two modes by selecting View>Toggle Expert Mode (Cmd-Opt X). Default and expert mode are synchronized. A change made in one editor will immediately be visible in the other one.

Note: Modifications won't affect the running instance until you load your changes into launchd(8) by selecting Job>Load (Cmd-Shift L) or by clicking the 'Load' button in the upper right corner of the editor panel.

Adding a config option

Make sure the Palette panel is visible View>Toggle Palette (Cmd-Opt P). Drag & Drop the desired key from the palette on the editor.

Removing a config option

In default mode, select the small cross symbol in the upper right corner of the configuration section. In expert mode, move the mouse pointer to the key you'd like to remove. One or more symbols will appear next to the key name: Add child, Add sibling and Remove. Click the last one.

Loading/unloading a job

Depending of the state of the currently selected job, the button in the upper right corner of the editor panel will either load or unload the job. Alternatively you may select the appropriate action from the Job menu.

Note: Loading a job does not necessarily start it. How/when a job is started is determined by the keys you provided for launchd(8). If you want to start a job immediately, load it and select Job>Start (Cmd-Shift S) from the menu.

The Palette Panel

In this panel you'll find any key officially supported by launchd(8). To make it easier for you to find the right key, LaunchControl has grouped keys into sections. Selecting a section using the popup button in the upper part of the palette panel will limit the number of displayed keys. You may also use the key filter below the section popup button to search for keys by name or description.

The palette panel may be switched on or off by selecting View>Toggle Palette (Cmd-Opt P).

The Log Panel

LaunchControl does its best to verify every job-setting you provide. But certain things cannot be checked. You need to run the job and verify that it works as expected. Usually this involves opening Console.app and creating a filter for your specific job, a tail/grep on /var/log/system.log or another means of searching logs. LaunchControl lets you query launchd(8) log files without the hassle. Select the job and click the 'Play' button in the upper left corder of the log panel. Please note that querying the log subsystem can be an expensive operation. Pause the query operation if you don't need it anymore.

The log panel may be switched on or off by selecting View>Toggle Log (Cmd-Opt L).

Currently you need to run LaunchControl as a privileged user to use the log view for daemons. Unprivileged users may use the log feature only for agents.

Debugging a job

While debugging a job it is not necessary to load/unload it manually every time a change to the configuration is made. Event triggered jobs might not be executed at all when loading. The preferred method is to start the job unconditionally by selecting Job>Start (Cmd-Shift S) from the menu. When a change is detected, a request panel will appear: click the Save, Reload and Start button.