How can I use launchctl to send a signal to a service?
2
votes
0
answers
476
views
As you can already see in the text below and screenshot of the terminal, whenever I try to send a signal to a service I have given
Does anybody have an idea to overcome this issue?
Edit:
Just to be clear, I am trying to start Background Sounds feature from terminal
Not privileged to signal service.
and Could not kickstart service "com.apple.accessibility.heard": 1: Operation not permitted.
~ % launchctl kickstart -k gui/$(id -u)/com.apple.accessibility.heard
Could not kickstart service "com.apple.accessibility.heard": 1: Operation not permitted
~ % sudo launchctl kickstart -k gui/$(id -u)/com.apple.accessibility.heard
Could not kickstart service "com.apple.accessibility.heard": 1: Operation not permitted
~ % launchctl kill SIGHUP gui/$(id -u)/com.apple.accessibility.heard
Not privileged to signal service.
~ % sudo launchctl kill SIGHUP gui/$(id -u)/com.apple.accessibility.heard
Not privileged to signal service.

defaults write com.apple.ComfortSounds comfortSoundsEnabled -bool YES
defaults write com.apple.ComfortSounds lastEnablementTimestamp $(date +%s)
launchctl kill SIGHUP gui/$(id -u)/com.apple.accessibility.heard
Second Edit:
I have solved my problem using the following commands, but still wondering **why cannot send signals to services?**
defaults write com.apple.ComfortSounds comfortSoundsEnabled -bool YES
killall heard
launchctl kickstart gui/$(id -u)/com.apple.accessibility.heard
Asked by Gurhan Polat
(141 rep)
Mar 29, 2024, 12:07 AM
Last activity: Mar 29, 2024, 01:23 PM
Last activity: Mar 29, 2024, 01:23 PM