5

I think that at one point in the past I disabled my media keys using the instructions provided in this answer. I am trying to re-enable them, but upon using the command:

launchctl bootstrap "gui/$(id -u "${USER}")/com.apple.rcd"

I get the error:

Unrecognized target specifier. <service-target> takes a form of <domain-target>/<service-id>.
Please refer to `man launchctl` for explanation of the <domain-target> specifiers.
Usage: launchctl bootstrap <domain-target> [service-path, service-path2, ...]

Because I'm a little confused about the "USER" part, I have also tried replacing USER with my username in different ways:

launchctl bootstrap "gui/$(id -u "${matt}")/com.apple.rcd
launchctl bootstrap "gui/$(id -u "matt")/com.apple.rcd
launchctl bootstrap "gui/$(id -u matt)/com.apple.rcd
launchctl bootstrap "gui/$(id -u)/com.apple.rcd

All of these return the same error.

1 Answer 1

1

To bootstrap you need to specify the path to the .plist file where the daemon is defined. For com.apple.rcd that's /System/Library/LaunchAgents/com.apple.rcd.plist.

Run the following:

sudo launchctl bootstrap gui/$(id -u) /System/Library/LaunchAgents/com.apple.rcd.plist

launchctl enable gui/$(id -u)/com.apple.rcd

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .