Skip to content

Instantly share code, notes, and snippets.

@mantissa
Last active February 3, 2018 12:28
Show Gist options
  • Select an option

  • Save mantissa/8231745 to your computer and use it in GitHub Desktop.

Select an option

Save mantissa/8231745 to your computer and use it in GitHub Desktop.

Revisions

  1. mantissa revised this gist Aug 31, 2014. 2 changed files with 1 addition and 1 deletion.
    File renamed without changes.
    2 changes: 1 addition & 1 deletion Terminal Scripts
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    // enable the script to launch the app on startup and automatically relaunch after crashing
    launchctl load /Library/LaunchAgents/AllOverRestart.plist
    launchctl load /Library/LaunchAgents/KeepAppAlive.plist

    // disable os crash notification messages
    defaults write com.apple.CrashReporter DialogType server
  2. mantissa revised this gist Jan 3, 2014. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions Terminal Scripts
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,5 @@

    // enable the script to launch the app on startup and automatically relaunch after crashing
    launchctl load Library/LaunchAgents/AllOverRestart.plist
    launchctl load /Library/LaunchAgents/AllOverRestart.plist

    // disable os crash notification messages
    defaults write com.apple.CrashReporter DialogType server
  3. mantissa created this gist Jan 3, 2014.
    16 changes: 16 additions & 0 deletions AppRestart.plist
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    <?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>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
    <key>Label</key>
    <string>AllOver.restart</string>
    <key>ProgramArguments</key>
    <array>
    <string>/Users/user/pathToApp/bin/AppName.app/Contents/MacOS/AppName</string>
    </array>
    </dict>
    </plist>
    12 changes: 12 additions & 0 deletions Terminal Scripts
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@

    // enable the script to launch the app on startup and automatically relaunch after crashing
    launchctl load Library/LaunchAgents/AllOverRestart.plist

    // disable os crash notification messages
    defaults write com.apple.CrashReporter DialogType server

    // suppress os messages to relaunch after crash
    defaults write -app /Users/user/pathToApp/bin/AppName.app NSQuitAlwaysKeepsWindows -bool false

    // remove saved state files
    rm -r /Users/user/Library/Saved\ Application\ State/com.yourcompany.openFrameworks.savedState