Skip to content

Instantly share code, notes, and snippets.

@maddox
Last active April 8, 2018 01:56
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save maddox/5609757 to your computer and use it in GitHub Desktop.
Save maddox/5609757 to your computer and use it in GitHub Desktop.
XBMC crashes. Use this. #tvops

Keep XBMC Alive on OS X

XBMC is great, but it kinda randomly crashes a lot. There's nothing worse than turning on your TV and seeing that XBMC isn't running anymore. It's even worse when its your significant other or roomate and you're out of town. #tvops.

So just install this launchd script to keep XBMC always running. This will launch it on boot, and if it crashes, it'll re-launch it.

Install

mkdir ~/Library/LaunchAgents
curl https://gist.github.com/maddox/5609757/raw/c223338a6a249cbcf83b28921e75a72a38236a29/com.xbmc.keepalive.plist > ~/Library/LaunchAgents/com.xbmc.keepalive.plist
launchctl load -w ~/Library/LaunchAgents/com.xbmc.keepalive.plist

Uninstall

launchctl unload -w ~/Library/LaunchAgents/com.xbmc.keepalive.plist

What about the crash reporter dialog window?

If XBMC does crash, sometimes the last crashes' reporter window is overlayed on top of all of the windows. This means XBMC might be back, but there's a big dumb dialog window on top of it!!

Fortunately you can disable that. This disables all crash reporting and hence, won't show that dialog if XBMC crashes.

This is a bit of a big change, but we don't really care about crash reporting on our dedicated media center boxes now do we?

Disable Problem Reporter

sudo chmod 000 /System/Library/CoreServices/Problem\ Reporter.app

Enable Problem Reporter

sudo chmod 755 /System/Library/CoreServices/Problem\ Reporter.app
<?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>com.xbmc.keepalive.plist</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/XBMC.app/Contents/MacOS/XBMC</string>
</array>
<key>OnDemand</key>
<false/>
<key>AbandonProcessGroup</key>
<false/>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>WorkingDirectory</key>
<string>/Applications</string>
</dict>
</plist>
@belkira2000
Copy link

Instead of changing the permissions on the Crash Reporter, you could try:

defaults write com.apple.CrashReporter DialogType server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment