mac play pcm_当按Mac键盘上的Play键时,阻止iTunes启动
mac play pcm
I love my MacBook Pro. I hate iTunes. I don’t think I’m alone. Yet every time I hit the “Play” button on my keyboard, or connect a Bluetooth speaker, iTunes shows up, mocking me.
我爱我的MacBook Pro。 我讨厌iTunes。 我不觉得我一个人。 但是,每当我按下键盘上的“播放”按钮或连接蓝牙扬声器时,iTunes都会显示出来,嘲笑我。
Ideally, I’d never see iTunes again. I use Vox to listen to music, and I don’t need Apple’s music player/music store/TV and movie store/iPhone and iPad backup tool/desktop App Store browser/subscription streaming service/podcast directory/resource hog. Is there some way to stop this from happening?
理想情况下,我再也不会看到iTunes。 我使用Vox收听音乐,不需要Apple的音乐播放器/音乐商店/电视和电影商店/ iPhone和iPad备份工具/台式机App Store浏览器/订阅流服务/播客目录/资源猪。 有什么办法可以阻止这种情况的发生?
As it turns out, yes. There have been many tricks for this over the years, as different methods keep breaking with new versions of macOS, but here’s what works now. I tested it on macOS Sierra, but it may work on earlier versions as well.
事实证明,是的。 这些年来,有许多技巧,因为新方法的macOS不断采用不同的方法,但这是现在可行的方法。 我在macOS Sierra上进行了测试,但它也可能在较早版本上运行。
如何阻止iTunes劫持播放键 (How to Stop iTunes From Hijacking the Play Key)
First, head to Applications > Utilities and open the Terminal. Alternatively, you can search for Terminal with Spotlight.
首先,转到应用程序>实用程序,然后打开终端。 或者,您可以搜索Terminal with Spotlight。
Once you’ve got the Terminal open, run this command:
打开终端后,运行以下命令:
launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist
Here’s a quick breakdown of what this all means, so it feels a little bit less like a magic spell:
这是所有含义的快速细目分类,因此感觉像魔术一样少一些:
-
launchctl
is a simple application on your Mac for controlling agents that run in the background.launchctl
是Mac上的一个简单应用程序,用于控制在后台运行的代理。 -
The word
unload
tellslaunchctl
you want to disable a particular agent.“
unload
”一词告诉launchctl
您要禁用特定的代理。 -
/System/Library/LaunchAgents/com.apple.rcd.plist
is the location of the agent you are disabling. Agents run in the background; this one launches iTunes when the “Play” key is pressed./System/Library/LaunchAgents/com.apple.rcd.plist
是您要禁用的代理的位置。 代理在后台运行; 当按下“播放”键时,这将启动iTunes。
Once you’ve run the command, try pressing Play on your keyboard. Nothing happens!
运行命令后,尝试按键盘上的Play。 没发生什么事!
If you want to avoid iTunes even more, I’d also suggest you change the default application for music files, otherwise opening those might launch iTunes.
如果要避免使用iTunes,建议您更改音乐文件的默认应用程序 ,否则打开这些文件可能会启动iTunes。
如何撤消此设置(和恢复默认行为) (How to Undo This Setting (and Restore the Default Behavior))
To undo this magical change, you just need to run this command:
要撤消这一神奇的更改,您只需要运行以下命令:
launchctl load -w /System/Library/LaunchAgents/com.apple.rcd.plist
launchctl load -w /System/Library/LaunchAgents/com.apple.rcd.plist
As you can see, this is nearly identical to the previous command, just with the word load
instead of unload
.
如您所见,这几乎与前面的命令相同,只是使用单词load
而不是unload
。
Press Play, and iTunes will reappear as it used to.
按“播放”,iTunes将重新出现。
mac play pcm