Launchd is a process management daemon, similar to "init". It is commonly used on Darwin-based systems.
Questions tagged [launchd]
640 questions
4
votes
1 answer
launchd: Managing a Java Jar
I have the following launchd configuration (stored in acme.plist) which I load and start using launchctl load acme.plist and launchctl start acme.plist respectively.

abhillman
- 3,942
- 1
- 20
- 21
4
votes
4 answers
iPhone app crashes when launched from Xcode, but not from iPhone
I have an app that is crashing on the iPhone, but only when it launched via Xcode.
I can see in the iPhone console log that the app receives a memory warning, and then there are some strange events like these:
Sun Jul 11 00:03:43 Matts-iPhone…

Matt Connolly
- 9,757
- 2
- 65
- 61
4
votes
1 answer
launch agent from daemon in user context
I have a launch daemon that runs in the login context of a Mac OSX 10.6 machine. I want to launch an agent for each user from that agent, and have the agent run in the user's login context. However, I need to control the precise arguments to the…

Thomi
- 11,647
- 13
- 72
- 110
4
votes
1 answer
How to start UI from OSX daemon or agent with root
I'm looking for a way to have my program started when user logins or when system boots up. The program needs to have root privilege and it needs to display some UI stuff on the top menu bar.
I have tried using launchd to start it as daemon and…

tjlian666
- 343
- 5
- 17
4
votes
1 answer
Python subprocess doesn't work when ran by launchd
I have a Python script that uses subprocess to run an AppleScript that changes my desktop background. A bash script is called by launchd periodically to run the Python script.
When I run the bash script from the command line it works fine, but the…

srobinson
- 346
- 2
- 4
- 18
4
votes
2 answers
Spawn a screen session from launch daemon
I've written a launchd .plist which should attach a debugger to the WindowServer when it launches. The main part of the script looks like
screen -D -m -S "WindowServer Debugger" \
gdb \
-x $GDBSCRIPT…

rgov
- 3,516
- 1
- 31
- 51
4
votes
3 answers
How to run a script in OSX first thing every morning AND directly after login / unlock?
I've researched this thing for quite some time now but haven't found any good solution, time to ask for the wisdom of the crowd...
Here's what I'm trying to achieve: Only on workdays, as the first thing that greets me when I log back in (with the…

endymi0n
- 43
- 1
- 4
4
votes
2 answers
iOS console application to be runned by launchd
Does anyone has some tips on creating a console tool in Xcode for iOS. I want to run it via launchd and it should send request to a server.
But I can´t find any way to compile a "application" without UI in Xcode for ARM.
Thx

PatrickPirker
- 359
- 3
- 15
4
votes
2 answers
running a python script on Mac boot
I'm trying to get a python script to run on startup. I have the following file: com.test.service.plist :

ierdna
- 5,753
- 7
- 50
- 84
4
votes
3 answers
How can I stop the Pow server from starting up at computer boot (OS X)?
TL;DR: Is there a way to disable the Pow server from starting when my machine boots up, but retain the ability to launch the server manually via powder up when I need it to run?
I am using Pow for my local development (and managing via the Powder…

AndrewS
- 1,395
- 11
- 23
4
votes
2 answers
Determine if cocoa app was started by the user or a cron/launchd job
Is there a way for a Cocoa application to tell if it's being run interactively or from something like cron? Basically I want to have the GUI appear if it's a person running the command, but if it's being called from something like cron, then I…

Gargoyle
- 9,590
- 16
- 80
- 145
4
votes
2 answers
launchd doesn't launch my daemon
I'm trying to figuring out why my daemon doesn't be launched automatically (on Mac 10.8.3). However, it works well on other machines. Here is my plist under /Library/LaunchDaemons/

Kimi Wu
- 309
- 1
- 4
- 17
4
votes
2 answers
Execute launchctl in sandboxed mac app
I need to execute the launchctl load/unload command from my sandboxed OSX app. The app has read-write permissions to the folder where the launch agent's plist file resides (using security scoped bookmarks which the user of the app is granting…

anka
- 3,817
- 1
- 30
- 36
4
votes
1 answer
Using launchctl in from NSTask
I want to execute launchctl from application.
For that I am using following code,
NSTask *task;
task = [[NSTask alloc] init];
[task setLaunchPath: @"/bin/launchctl"];
NSArray *arguments;
arguments = [NSArray arrayWithObjects: @"load ",…

RLT
- 4,219
- 4
- 37
- 91