1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

macOSでMusicが勝手に起動するのを止める方法

1
Posted at

macOSでMusicが勝手に起動するのを止める方法

要点と進め方

どういうわけか macbook AIR の横でスマホをサブPC代わりにして作業していると、ミュージックアプリがやたらと起動するようになった。閉じても勝手に起動してウイルス感染を疑うレベル。
❓macOSでBluetoothイヤホン接続時や再生ボタン操作をきっかけに 🎧Music が勝手に起動する場合、com.apple.rcd が関係していることがあるらしい。

この記事では、まず disable で安全に切り分ける方法を中心に、unload -w との違いもあわせて整理します。

  • 🎛 com.apple.rcd の役割

  • 🔍 状態確認

  • 🛑 disable で一時停止する方法

  • ⚖️ unload -w との違い

  • 🔁 元に戻す方法

⭐️ まずは disable で試すのが扱いやすいにゃ

🎛 com.apple.rcd とは

com.apple.rcd は、macOSで再生ボタンやメディアキー入力を扱うバックグラウンドサービスです。

たとえば次のような操作に反応します。

  • 🎧 Bluetoothイヤホンの再生ボタン

  • ⌨️ キーボードの再生キー

  • 🖱 マウスや周辺機器のメディア操作

このため、Musicの勝手な起動原因を切り分けるときによく確認対象になります。

🔍 まず状態確認

# 実行中かどうかを確認
launchctl print gui/$(id -u)/com.apple.rcd
# state や pid が表示されれば状態を見られる

state = running なら動作中です。

🛑 まずは disable で切り分ける

一時的に止めて、Bluetooth接続や再生ボタンでMusicが起動するかを確認します。

# 自動起動を無効化
launchctl disable gui/$(id -u)/com.apple.rcd

# いま動いているプロセスを終了
launchctl kill SIGTERM gui/$(id -u)/com.apple.rcd

この状態で再現しなくなれば、rcd が原因の可能性が高いです。

⭐️ 原因調査ならこの方法がいちばん素直だにゃ

⚖️ unload -w との違い

以前は launchctl unload -w で落とす方法もよく使われていました。

# 古めのやり方の例
launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist

ただし、比較すると次のような違いがあります。

disable を使う場合

  • 現在の launchctl の考え方に沿っている

  • ラベル名で直接扱える

  • enable で戻しやすい

  • 原因切り分け用途に向いている

unload -w を使う場合

  • plist のパス指定が必要

  • 古い手順として紹介されることが多い

  • macOSのバージョン差分で扱いにくいことがある

  • 今から試すなら disable のほうが無難

⭐️ 今から試すなら unload -w より disable を優先でよいにゃ

🔁 元に戻す

# 無効化を解除
launchctl enable gui/$(id -u)/com.apple.rcd

# 起動し直す
launchctl kickstart gui/$(id -u)/com.apple.rcd

🧪 最小チェック手順

# 1. 状態確認
launchctl print gui/$(id -u)/com.apple.rcd

# 2. 一時停止
launchctl disable gui/$(id -u)/com.apple.rcd
launchctl kill SIGTERM gui/$(id -u)/com.apple.rcd

# 3. 戻す
launchctl enable gui/$(id -u)/com.apple.rcd
launchctl kickstart gui/$(id -u)/com.apple.rcd

これで、Musicの自動起動が rcd 起因かどうかを短時間で判断できます。

🍏 補足

rcd 以外に、ログイン項目や周辺機器側の再生ボタン設定が原因なこともあります。
rcd を止めても改善しない場合は、そちらも確認すると切り分けしやすいです。

macos-disable-rcd-vs-unload-w.md

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?