RC RANDOM CHAOS

Music Decoy: A Tiny macOS App That Stops Apple Music From Auto-Launching

· via Hacker News

Original source

Stop the Apple Music app from launching

Hacker News →

Music Decoy is a lightweight macOS utility that prevents the system Music app from opening when the Play key is pressed, a Bluetooth headset connects, or a call ends. It works through a clever trick: the app registers itself with the bundle identifier com.apple.Music, fooling macOS’s Remote Control Daemon (rcd) into believing Music is already running. Because rcd only launches Music when no app claims to be handling audio, the decoy silently absorbs the play event without consuming CPU.

Since version 1.1, users can redirect the Play key to launch a different media app such as Spotify by setting a defaults key (com.lowtechguys.MusicDecoy mediaAppPath). The author contrasts this approach with alternatives like unloading rcd entirely, which kills media key functionality, or noTunes, which polls for launched apps and uses background CPU. Music Decoy ships with no Dock or menubar presence, so quitting requires Activity Monitor or a killall command.

The technique is a neat example of exploiting macOS’s reliance on bundle identifiers for process identity, achieving a useful behavioral change with essentially zero runtime cost.

Read the full article

Continue reading at Hacker News →

This is an AI-generated summary. Read the original for the full story.