Skip to content

Instantly share code, notes, and snippets.

@listochkin
Created October 17, 2018 15:27
Show Gist options
  • Save listochkin/972d2f053398bc68d93e1f12bfaa0764 to your computer and use it in GitHub Desktop.
Save listochkin/972d2f053398bc68d93e1f12bfaa0764 to your computer and use it in GitHub Desktop.
No root prompt for Turbo Boost Switcher on TouchID Macs

No root prompt for Turbo Boost Switcher on TouchID Macs

Installation:

  1. Enable TouchID for sudo. Open /etc/pam.d/sudo and add auth sufficient pam_tid.so before other rules.
  2. Remove Turbo Boost Switcher from login items
  3. Put turbo-boost-switcher-as-root.sh to /usr/local/bin/
  4. chmod +x /usr/local/bin/turbo-boost-switcher-as-root.sh
  5. Put turboboostswitcher.asroot.plist to ~/Library/LaunchAgents
  6. Run launchctl load ~/Library/LaunchAgents/turboboostswitcher.asroot.plist
  7. Wait till TouchID prompt, then go to a running Turbo Boost Switcher and change the settings. Do not check open at login

Enjoy!

#!/usr/bin/env bash
sleep 30
sudo '/Applications/Turbo Boost Switcher.app/Contents/MacOS/Turbo Boost Switcher'
<?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.turboboostswitcher.asroot</string>
<key>ProgramArguments</key>
<array>
<string>/bin/sh</string>
<string>/Users/andreil/.bin/turbo-boost-switcher-as-root.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<false/>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment