On Apple macOS, a launch daemon is a system service which runs as a regular process, but independently of login/windowing sessions in the background, and frequently with root/administrator privileges. This is in contrast to launch agents, which are linked to sessions, and to system extensions, which run in special sandboxed environments and runtimes.
Questions tagged [launch-daemon]
83 questions
1
vote
0 answers
How should Postgres be installed to run as a daemon under user name _postgres on Mac OSX?
I followed directions for installing Postgres on Mac OS X using Brew. All worked well. I placed a .plist in my Library/LaunchAgents and had Postgres running when I logged in. However, when I logged out postgres shuts down (which is correct…

kd4ttc
- 1,075
- 1
- 10
- 28
1
vote
1 answer
systemd servicefailed to connect to session d-bus
I have a application which has to connect to session dbus during bootup. If I start my application manually or start with initd, it is starting and connecting to session dbus. But if I start through systemd by giving command as systemctl --user…

deepan muthusamy
- 321
- 2
- 14
1
vote
1 answer
Application do not start on system reboot
I have created a LaunchDaemon service which runs a application
sudo launchctl load /Library/LaunchDaemons/com.testapp.plist
Here is my com.testapp.plist:

Akshada-Systematix
- 321
- 3
- 17
1
vote
0 answers
Background services on Mac OS X
I want to make an OS X app which continuously capture photo in some time interval and send that photo to the server via any service (HTTP/Socket).
I searched about this and get that to achieve the same I need to make a daemon service (using launchd)…

Akshada-Systematix
- 321
- 3
- 17
1
vote
0 answers
LaunchDaemon running every 10 seconds - OSX
What im trying to do is to detect when an iphone is connected to a Macbook Air(10.11.6), and when it is i need to retrieve the UDID of the device. To that extend i created a Daemon that triggers a script when a new usb is plugged in:

Nuno
- 11
- 2
1
vote
1 answer
RabbitMQ doesn't start using launchd
I use a MacPorts ecosystem and the rabbitmq-server port is really old and it doesn't work anymore. So I have installed rabbitmq-server on Mac OS X Sierra, using Generic Unix release. It works.
RabbitMQ is installed under…

noun
- 3,635
- 2
- 25
- 27
1
vote
1 answer
How should be the launchd file be if I don't want the deamon to load and/or start automatically?
I'm adding a launchd file for MySQL that I don't want to be automatically started. Just wondering what I should change in the file.
/Library/LaunchDaemons/com.mysql.mysql.plist

Srini K
- 3,315
- 10
- 37
- 47
1
vote
0 answers
OSX: Why is my launchd agent running my script twice?
I have one plist associated with this launchd agent. There is one agent listed in launchctl list, and it calls my bash script, called rc.wakeup, whenever the mac is woken up from sleep. There is only one copy of this bash script. The code in the…

Kyle Birch
- 75
- 1
- 10
1
vote
0 answers
Python daemon status is unknown
I have created a python daemon by a Tutorial and it is running just as tutorial example has. But there are problems:
The output of service --status-all says:
[ ? ] testdaemon
Can anyone help me to find out what those errors and warnings are or…

Parisa
- 83
- 1
- 9
1
vote
1 answer
Cydia package preinst/postinst can't reload launch daemon
I'm writing an app for jailbroken iOS that includes both a UI application and a launch daemon. I set up the launch daemon as a subproject of the UI application project.
Everything's working perfectly, except that I can't get the package to unload…

drewmm
- 737
- 6
- 17
1
vote
1 answer
How to Load LaunchDaemon plist from my Mac Application
I'm trying to a Load LaunchDaemon plist from my Mac Application.
When i try to load it in terminal it loads successfully, but when i try to
load it thru my code, it doesn't work.
Here is my code :
OSStatus status;
AuthorizationRef…

Vgay
- 11
- 3
1
vote
1 answer
Start script osx launch daemon
I'm trying to run an executable on my machine (mbp retina osx mountain lion) on startup.
This is what the script looks like:

The Internet
- 7,959
- 10
- 54
- 89
0
votes
0 answers
Where is __asan::ReportGenericError saving its report?
I'm getting the following crash report for my macOS launch daemon when it exits:
(An abridged version):
Process: MyService [30028]
Path: /Library/PrivilegedHelperTools/*/MyService
Identifier: …

c00000fd
- 20,994
- 29
- 177
- 400
0
votes
0 answers
AuthorizationCreate returns errAuthorizationInternal (-60008) on macOS
I have a command line tool written in C++ with the Xcode that should detect if it's running as root (which is needed to communicate with my launch daemon):
if(geteuid() != 0)
{
//Not root
}
And if not, show the prompt to elevate itself (in a…

c00000fd
- 20,994
- 29
- 177
- 400
0
votes
0 answers
How to tell programmatically if my launch daemon is currently running on macOS?
From an app written in C++, how can I tell that my launch daemon is currently running? And preferably how to get its PID?
For instance, if I run the following in the terminal:
launchctl list com.example.MyService
I get…

c00000fd
- 20,994
- 29
- 177
- 400