Questions tagged [launchctl]
91 questions
1
vote
0 answers
how to autostart php-fpm on mac
i wanna install the nginx and php on my mac(Yosemite10.10.5).but the php-fpm can't autostart when i restart the mac.
step1,install nginx by brew
===>success, i can visit the http://localhost/index.html
step2,set the nginx service autostart as…

elf
- 11
- 3
1
vote
0 answers
Launchctl command line equivalent of "absolutePathForAppBundleWithIdentifier("com.bundle.helper")
On OS X, I'm looking for a command line which would show the known path of a bundleIdentifier from Launch Services point of view.
If there're several bundles with same id, my app keep looking for a trashed one, or copied, and it's hard to…

Tom
- 613
- 6
- 14
1
vote
1 answer
launchctl status returns 2
I'm trying to write a launchd script that will run a Python script every hour.
I created the following file in ~/Library/LaunchAgents/
com.b00tahead.engage-check.plist

Scott
- 142
- 3
- 12
1
vote
1 answer
Get launchd to run task when network connects or reconnects
I run a custom python script to update various dynamic DNS servers through launchctl and it runs every 15 minutes. This is both overkill and underkill.
It would be nice if the script would execute only when reachability changes, and then as a…

stormj
- 43
- 5
1
vote
1 answer
Running Python Script at startup of OSX
I have a Python script that I want to execute as soon as I login into my Mac . I have tried various methods on the internet. But none of them seem to work .
I tried placing the com.username.scriptname.plist file in Library/LaunchAgents.
user4865860
1
vote
0 answers
How does one persist the `launchctl limit` in OS X Yosemite?
There's a note in the launchctl man pages stating that:
launchctl no longer has an interactive mode, nor does it accept
commands from stdin. The /etc/launchd.conf file is no longer consulted
for subcommands to run during early boot time; this…

Yuriy Nemtsov
- 3,869
- 4
- 30
- 44
1
vote
1 answer
Did I relaunch / reconfigure every launchctl daemon here?
I accidentally issue the following command:
launchctl load -w /System/Library/LaunchDaemons/
The output:
bind(): Address already in use
bind(): Address already in use
bind(): Address already in use
bind(): Address already in…

Marcel
- 1,266
- 7
- 18
0
votes
0 answers
iperf3: Command not found error when running Python script through launchctl
I have a Python script scheduler.py to monitor and record network metrics using a few different tests, with iperf being one of them. I need this script to run on boot up, which is why I have set up a LaunchAgent with the RunAtLoad flag set to true.…

user10819743
- 1
- 2
0
votes
1 answer
How to start/stop my launch agent in all logged in sessions from a root user process?
I'm writing an installer for my launch daemon, and for a launch agent, that will run in every logged in user session on macOS. The installer will be running as an admin, and thus I can install and start my launch daemon as such:
launchctl load…

c00000fd
- 20,994
- 29
- 177
- 400
0
votes
0 answers
How to start a launch agent on demand after the installation?
I've coded my launch daemon and a launch agent for macOS. When the app is installed, I need to run both the daemon and the agent. I place the .plist for the deamon into /Library/LaunchDaemons and then run (as admin):
launchctl load…

c00000fd
- 20,994
- 29
- 177
- 400
0
votes
0 answers
How to make brew services use user/501 instead of gui/501 with launchctl?
I have this strange problem with launchctl not working when using gui/501 instead of user/501, details are here: launchctl bootstrap gui/501 shows "bad ownership/permissions" (but user/501 works)
I would actually prefer if brew services started my…

Hackeron
- 616
- 7
- 14
0
votes
0 answers
launchctl bootstrap gui/501 shows "bad ownership/permissions" (but user/501 works)
I'm on Mac Ventura 13.1, I moved my home dir to an external drive as the internal SSD is unusably small (256GB). I followed this guide: https://www.lifewire.com/move-macs-home-folder-new-location-2260157
Everything appears to be working correctly…

Hackeron
- 616
- 7
- 14
0
votes
1 answer
Launchd 'Invalid Property List'
I was hoping someone could point out where I might be going wrong with a launchctl script I'm trying to write and launch.
The intention is to run a python script I've managed to get working, everyday at 3.15am. (the computer it's going to run on is…

JaceExton
- 15
- 6
0
votes
0 answers
Launchctl refusing to launch postgres as a Daemon
I've written a plist file to try to get Postgres to load on startup on Mac OS X but I can't get it to start the service. The plist file is saved in /Library/LaunchDaemons.

Merely Useful
- 1
- 1
0
votes
1 answer
How to programmatically start an application at user login?
I am attempting to port a C# Windows application to macOS 12 Monterey for the first time. One of its features was setting up automatic start-up, which in there was done through Windows registry. I have found out that on macOS this is done through…

pbnn
- 13
- 3