Freitag, 24. April 2015

Layered modo Configs under OS X 10.10 Yosemite and later

Since Apple thinks it is boring to keep thing consistent we once again need a different approach to get the layered configs with modo to work in OS X 10.10

Create a file called envrionment.plist in ~/Library/LaunchAgents
The file should have the following content. Remember to change the paths in bold to your own locations.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>my.startup</string>
    <key>ProgramArguments</key>
    <array>
        <string>sh</string>
        <string>-c</string>
        <string>
        launchctl setenv NEXUS_LICENSE /path/to/license
        launchctl setenv NEXUS_PREFS /path/to/prefs
        launchctl setenv NEXUS_USER /path/to/user
        </string>

    </array>
    <key>RunAtLoad</key>
    <true/>
</dict>
</plist>

To load the file without a reboot call launchctl load ~/Library/LaunchAgents/environment.plist from a Terminal window. After that you are good to go.