Launchd is a process management daemon, similar to "init". It is commonly used on Darwin-based systems.
Questions tagged [launchd]
640 questions
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
15
votes
1 answer
What are the OS X session types, and what do they mean?
I've been trying to find out the meaning of LimitLoadToSessionType in launchctl on OS X (Lion).
After scouring the internet, it seems the value can be one of:
Aqua, LoginWindow, Background, StandardIO and System.
Are there any missing, and more…

user756079
- 301
- 2
- 13
13
votes
0 answers
How should I clean up the launchd StandardOutput or StandardError logs?
I've got a program that runs as a launchd agent, and I have stdout and stderr sent to a log file using the StandardErrorPath and StandardOutputPath keys. I'm quite keen on having stdout/stderr logged somewhere, and it seems like having launchd set…

Tom Seddon
- 2,648
- 1
- 19
- 28
12
votes
1 answer
launchctl sub commands load and unload says its legacy sub commands on mac os x 10.10. how to replace this sub commands with other
I have found that the launchctl sub commands like load/ unload listed in legacy sub commands on mac os x 10.10.
So my question is how to launchctl to load/unload demons present at /Library/LaunchDaemons/
I visited the link.
using this I do sudo…

hkb_dev
- 379
- 1
- 14
12
votes
2 answers
Run a shell script periodically on Mac OS X without root permission
I want to start up a file with .sh type or .py on mac os x without using root ,
I searched in google and found launchctl can help me ,
so i read tutorial and do same in tutorial but it not work for me , [i using mac os x 10.9 x64]
My .plist file…

user3671325
- 306
- 2
- 6
- 14
12
votes
1 answer
Making Mac OSX launchctl launch a process as root on startup
My question is how to make a MacOSX daemon process using launchd start with root privileges automatically after a reboot?
I'm writing an application for in house use that blocks access to web sites. It is written in python and modifies the…

Keith John Hutchison
- 4,955
- 11
- 46
- 64
12
votes
4 answers
Starting/stopping a launchd agent for all users with GUI sessions
I need to be able to start/stop a per-session GUI agent from a root level daemon.
Similar issues are discussed here, here and here.
What I want to be able to do is basically
for num in `ps ax | grep [s]bin/launchd | cut -c 1-5`;
do
if [ $num…

Redwood
- 66,744
- 41
- 126
- 187
11
votes
1 answer
Binding on privileged ports (ports < 1024) on Mac OS X 10.6
Do you know how to remove restriction on binding to ports < 1024 with a user account that is not root on Mac OS X?

Nicu B.
- 111
- 1
- 4
11
votes
1 answer
Is it possible to detect Power Nap / DarkWake mode in OSX
I have a daemon process started via launchd. This will be running even during DarkWake and has no time to finish before OS X goes back to sleep again.
I can think of the following solutions, but didn't find a way to achieve this.
Don't make this…

user12345
- 425
- 1
- 3
- 14
11
votes
5 answers
setenv variable with spaces in launchd.conf?
I'm a Linux user that just recently got a mac. I'm trying to set up my IDE and found out that Macs don't use .bashrc / .bash_profile / etc. for GUI apps. So, if you have a GUI app that needs an environment variable, you're apparently supposed to do…

inanutshellus
- 9,683
- 9
- 53
- 71
11
votes
2 answers
MacOS: Manually force a daemon to start
I've created a plist file in the /Library/LaunchDaemon/
The computer on which it runs cannot be restarted (server thing), it's running MacOS Tiger. I expected the following command to do the job, but it states it's not meant to be run…

Jem
- 6,226
- 14
- 56
- 74
11
votes
2 answers
Mac OS X daemon using Objective-C - launchd
I'm new in Mac OS X world but I have skills on Windows dev.
I need to develop a daemon (on Windows will be Windows Service) that uploads/downloads files from a Web Service.
My question is: is it possible to create an app written in Objective-C that…

avmauricio
- 1,008
- 1
- 7
- 19
10
votes
2 answers
SMJobBless failed with CFErrorDomainLaunchd Code 9
Does anybody know what does that error code mean?
I get SMJobBless error with this return code value.
Failed to bless helper: Error Domain=CFErrorDomainLaunchd Code=9 "The operation couldn’t be completed. (CFErrorDomainLaunchd error 9.)"
I googled,…

andrey.s
- 789
- 10
- 28
9
votes
6 answers
How to remove pm2 from startup (on mac)
I experimenting with pm2, which is a process manager for node.js applications. I tried their pm2 startup utility which generates and installs a startup script for pm2 when the system restarts.
I tried this on my mac, and it works flawlessly. The…

Shaunak
- 17,377
- 5
- 53
- 84
9
votes
1 answer
Is there a way to update SMLoginItemBookmarks data on launchd overrides.plist
I'm working on an OS X app that most users choose to "launch at login", the kind you'd find at the menu bar.
In order to launch it at login I'm using SMLoginItemSetEnabled to launch a LoginHelper app that will open the main app, as described in this…

Mariano
- 91
- 2