Questions tagged [launchctl]
91 questions
111
votes
17 answers
brew services. Cant start service. get "Bootstrap failed: 5: Input/output error"
running brew services start mongodb-community which yields:
Bootstrap failed: 5: Input/output error
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users//Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist`…

dasqueel
- 1,709
- 2
- 15
- 16
29
votes
9 answers
Stop postgreSQL service on Mac via terminal
Running postgreSQL 9.4.5_2 currently
I have tried
pg_ctl stop -W -t 1 -s -D /usr/local/var/postgres -m f
Normally no news is good news but after I will run
pg_ctl status -D /usr/local/var/postgres
and get pg_ctl: server is running (PID: 536)
I…

Andrew M
- 1,083
- 2
- 12
- 15
16
votes
4 answers
launchctl - remove enabled/disabled override
On OS X Yosemite (10.10), is there any way to remove the enabled/disabled override setting for a service?
For example, to permanently disable non-existent service 'test' for root, do this:
sudo launchctl disable user/0/test
Check that it has been…

Francis
- 259
- 1
- 2
- 11
10
votes
1 answer
what does launchctl config user path do?
I was having a strange problem with PATH environment variable in MacOS that I spent several hours to debug:
Some time ago, when I was trying to fix the issue IntelliJ terminal PATH variable not the same with iTerm, I followed an online article and…

Phuong Nguyen
- 2,960
- 1
- 16
- 25
8
votes
3 answers
How to record audio from a background (launchctl-based) process under Mojave/Catalina?
First, a little background info to explain my motivation: I've got a Qt/C++/Objective-C++ application that uses CoreAudio/AVFoundation to receive incoming audio from specified audio inputs on the Mac, modify the audio, and then play the modified…

Jeremy Friesner
- 70,199
- 15
- 131
- 234
7
votes
2 answers
Brew services start and stop issue
I've got two services one is elasticsearch, the other is mongodb, recently I found the mongodb service have some issues while i start or stop it.
The case is while I start mongo with the following command when the mongodb service is actually…

Qingjian Wang
- 155
- 1
- 2
- 8
6
votes
1 answer
How to use launchctl to reload changes to plist?
On MaxOS I created ~/Library/LaunchAgents/x.plist. Then I loaded it with "launchctl load ..."
I made some edits, unloaded and reloaded it. When I type "launchctl list x" it does not display any of my mods to the plist file.
How can I get…

Lawrence I. Siden
- 9,191
- 10
- 43
- 56
6
votes
1 answer
How to check for errors in a `.plist` file
I haven't been able to figue out why launchctl is saying this .plist is invalid.
I'm trying to run a Python script once a day at 8AM. the first program argument is the path to the pyenv virtualenv binary, the second is to my Python script.
Is there…

dleft
- 73
- 1
- 4
6
votes
3 answers
Enable, disable and start services programmatically in macOS
I am writing a program that comes with a service. What I did so far is to create a helper tool that can run elevated tasks for my process and can communicate via XPC.
My program comes bundled with a service and I want to use the helper tool to…

Nidhoegger
- 4,973
- 4
- 36
- 81
5
votes
1 answer
Bootstrap failed: 5: Input/output error while running any service on macOS Big Sur version 11.5.2
I am trying to run mongodb-community@4.2 service using brew services start mongodb-community@4.2 (facing similar error, while running httpd service or any other service)
Following is the error:
Error: Failure while executing; /bin/launchctl…

Chirag Singla
- 51
- 2
5
votes
2 answers
jenkins slave on mac directory not accessible
I am trying to start jenkins slave on mac mini with following /Library/LaunchDaemons/com.jenkins.ci.plist

roy
- 6,344
- 24
- 92
- 174
5
votes
1 answer
What the heck is Apple_Ubiquity_Message?
OSX 10.8.4
> printenv
...
Apple_Ubiquity_Message=/tmp/launch-YzDhDA/Apple_Ubiquity_Message
...
> ls -al /tmp/launch-YzDhDA/Apple_Ubiquity_Message
srw-rw-rw- 1 user wheel 0 Jul 25 10:01 /tmp/launch-YzDhDA/Apple_Ubiquity_Message
StackOverflow…

Johannes Ernst
- 3,072
- 3
- 42
- 56
4
votes
0 answers
how to cleanup launchctl when removing app
I writing an app for Mac, one of it's components is a launchctl agent that runs in background.
As mac apps are removed by dragging to trash (I can understand this logic but takes getting used to after years of windows dev'ing), I'm wondering is…

Shachar
- 359
- 2
- 6
4
votes
2 answers
launchctl can't run the binary and exits with a code 78
I've been building a golang app with system tray GUI. I wanted launchctl to run my program whenever I log in. Program compiles and runs without any error, however, when launchctl runs it, I see this: Service exited with abnormal code: 78. Perhaps it…

krlc
- 376
- 4
- 9