Skip to content

Instantly share code, notes, and snippets.

@imekachi
Created August 29, 2023 03:19
Show Gist options
  • Save imekachi/b6747086d15aa6ca954b361fedee4ab3 to your computer and use it in GitHub Desktop.
Save imekachi/b6747086d15aa6ca954b361fedee4ab3 to your computer and use it in GitHub Desktop.
Disable Apple music from opening when pressing play / pause / media keys on Mac and Headphones

Run this command to disable it

# Disables it immediately
launchctl bootout "gui/$(id -u "${USER}")/com.apple.rcd"
# Prevents reactivating on restart
launchctl disable "gui/$(id -u "${USER}")/com.apple.rcd"

To revert to the default behavior

launchctl bootstrap "gui/$(id -u "${USER}")/com.apple.rcd"
launchctl enable "gui/$(id -u "${USER}")/com.apple.rcd"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment