BetterTouchTool keeps exiting. How do I make sure that it reopens when it exits, and that duplicate processes aren't spawned?
Thanks
BetterTouchTool keeps exiting. How do I make sure that it reopens when it exits, and that duplicate processes aren't spawned?
Thanks
You could create a launch agent, that starts when you first log in and re-starts if exited. Although I’m sure the app has created one for it self, and some setting might not be set correctly. Create on is quite simple. Here is an example if BetterTouchTool was installed in /Applications
folder, and had the executable in MacOS folder in the bundle. You’ll have to restart after creating and saving this plist file in ~/Library/LaunchAgents/
folder.
<?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>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>Label</key>
<string>BetterTouchTool</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/BetterTouchTool.app/Contents/MacOS/BetterTouchTool</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
If you don't wish to restart, you can run this to start the agent:
launchctl load <path to the newly created plist file>
You can change the value of program argument to what ever you like and read more about launch agents by typing man launchd.plist
in the Terminal. This will tell you about all the available options. There are also GUI apps to create these plist files for you, my favourite is Lingon X.
Though I would recommend you contact support for the app first, because this can result is in unexpected behaviour and mess with it’s functions. Like even if you force quit it now it’ll automatically launch (it depends on the value of SuccessfulExit key).
KeepAlive
on condition of SuccessfulExit
? My problem is that the program (unsuccessfully) crashes, and I need to relaunch it? Promising answer.
Commented
Apr 29, 2015 at 19:47
.app
and change the SuccessfulExit
flag to false
, as that recovers BTT from crashing. Very informative, thanks.
Commented
Apr 29, 2015 at 23:29
Open Terminal window and paste
while true; do open -Wg /Applications/BetterTouchTool.app; sleep 1; done
while true
loop. Blocks everything.
Commented
Apr 29, 2015 at 19:48