Questions tagged [launch-agent]
61 questions
53
votes
10 answers
what does launchd status 78 mean?? why my user agent not running??
I want to run a unison sync service running in the background whenever I login. But the status code of my agent is 78. I don't know why, I tried some fix posted online, but it just doesn't work.
What's the problem?? below is the plist file for my…

Aaron Shen
- 8,124
- 10
- 44
- 86
34
votes
8 answers
How to know a specific launchd .plist file location?
Is it possible to know the .plist file location which is loaded by the launchctl command?
The label name is listed with launchctl list and its contents can be viewed by launchctl list LABEL, but I cannot find the .plist file location.
I know it will…

Kurosawa Hiroyuki
- 1,217
- 2
- 14
- 22
8
votes
2 answers
Using a LaunchAgent inside the Mac app sandbox
How would you use a LaunchAgent inside the sandbox? I want to distribute a UI-less LaunchAgent app bundle inside my main application that I can launch on demand. The reason I want this instead of an XPC service is for the KeepAlive option, which…

indragie
- 18,002
- 16
- 95
- 164
7
votes
0 answers
Is there a way to execute a shell script whenever a HID device is connected either directly or over bluetooth?
I'm taking advantage of macOS's hidutil command to perform custom key mappings, as per this link from Apple here. The issue is we're using a KVM which keeps disconnecting, then re-connecting the keyboard and every time that happens, our custom key…

Mark A. Donohoe
- 28,442
- 25
- 137
- 286
5
votes
1 answer
Jenkins Slave Issue - invalid stream header: 099EACED
Jenkins 2.7.4 was installed in the RedHat Server and Linux Slaves is configured by Selecting "Launch agent via execution of command on master" option. We created a Shell script and it works fine in the Jenkins version 2.7.4.
Now we upgraded the…

user2439278
- 1,222
- 7
- 41
- 75
5
votes
0 answers
Launch Agent Error Code 127
I have a plist that is supposed to run a shell script, the shell script has been chmod +x /path/to/myscript and I have checked that it runs properly. Below is my plist:
Label
…

Patrick Cook
- 458
- 12
- 27
5
votes
1 answer
Cannot set custom $PATH for Qt Creator on OS X 10.10
I use Qt Creator with custom build system (ninja).
The issue is that the $PATH variable passed to the Qt Creator IDE is absolutely vanilla: /usr/bin:/bin:/usr/sbin:/sbin.
So I have to write bash -c '/path/to/ninja list of targets' instead of just…

Nickolay Merkin
- 2,673
- 1
- 16
- 14
5
votes
1 answer
OSX: "Window Server: failed setting the front application to My App"
I am launching a launchAgent from a post install script using the following command:
su -l $LOGGED_IN_USER -c "/bin/launchctl load /Library/LaunchAgents/com.myApp.mac.agent.plist"
The agent displays a status item (NSStatusItem) with a couple of…

Shanti K
- 2,873
- 1
- 16
- 31
4
votes
1 answer
stopping LaunchAgent when uninstalling package
I build an app which provides LaunchAgent (an small UI app with "tray" icon; let's say that defined in /Library/LaunchAgents/foo.plist.
When installing package launchctl loads this LaunchAgent description automatically and starts processes for all…

Zbigniew Zagórski
- 1,921
- 1
- 13
- 23
3
votes
1 answer
How to add an application as a login item for all users in Mac OSX
I am trying to add an application as login item for all users by creating an launchd plist and copying it in /Library/LaunchAgents and also by loading it.
Plist is

MacDeveloper
- 1,334
- 3
- 16
- 49
3
votes
0 answers
How to load launch daemon to have an access to WindowServer in LoginWindow context?
I am developing an application for OSX that can access to WindowServer. This application (lets call it an Agent) is first loaded for every user that is currently logged in. I am searching for running loginwindow processes, and load my plist as each…

Ghulash
- 31
- 2
3
votes
1 answer
Need documentation for Apple launch.h api
I have a service loaded via terminal as
launchctl load /System/Library/LaunchAgent/com.example.my.plist
Now, I need to programmatically detect if the service is running or not and start the…

VS7
- 133
- 2
- 6
2
votes
1 answer
Change mysql db location when installed with homebrew using Big Sur and external hard drive
Previously I had /usr/local/var/mysql symlinked to /Volumes/External/mysql meaning all my databases were stored on the external hard drive.
I have had to reformat my machine and upgrade to BigSur. If I try to set up the symlink as before I now get…

goose84
- 282
- 1
- 2
- 15
2
votes
1 answer
Can I use MacOS tccutil to reset ScreenRecording permissions for a daemon that has no bundleID?
I have a LaunchdAgent (e.g. /etc/someDir/myAgent) running, which asks permission to record the screen. System Popup pops - user permits screen-recording in the System-Preferences "Security & Privacy" panel, the "Privacy" tab. It is clearly visible…

Motti Shneor
- 2,095
- 1
- 18
- 24
2
votes
2 answers
List All Loaded/Unloaded or Both Launch Agents On macOS
I am trying to figure out how many launch agents are loaded right now using following command the it
find /System/Library/Launch* /Library/Launch* ~/Library/Launch* -name '*.plist' -exec sh -c '/usr/libexec/PlistBuddy -c "Print Label" {} && echo {}'…

Vikram Sinha
- 581
- 1
- 10
- 25