Questions tagged [launch-agent]
61 questions
1
vote
2 answers
OSX why my launchagent process starting as root instead of current user
I want to run the process as the current user. But it is starting as root. How can I start the process as the current user?
This script is run in postinstall in a OSX package. Packaging using pkgbuild.
Is there any relation to how I build the…

karim
- 15,408
- 7
- 58
- 96
1
vote
1 answer
MAC OSX Agents - how to launch multiple instances
I am trying to create helper objects (it could be a daemon or an agent). This should be launch on demand and its multiple instances should be there, as you see for Chrome and Safari helpers.
What Have I tried?
I have referred these Apple Docs,…

Anoop Vaidya
- 46,283
- 15
- 111
- 140
1
vote
1 answer
OSX Yosemite LoginWindow agent not persisting into login
In Mavericks and earlier, LaunchAgent plist with LimitLoadToSessionType set to LoginWindow would always run the agent in the LoginWindow and persist it into the log in account session.
Now in Yosemite, if you've specified LoginWindow as the only…

doom4d.h
- 63
- 7
1
vote
0 answers
Launch Agent and "CGSDeviceSynchronize: Invalid device window"
I have created an OSX App which runs as a LaunchAgent. It has a Status Menu. After installation if I logout and login again, the Status Menu doesn't appear. The app appears in the activity monitor though. I noticed that the Main Xib itself is not…

Shanti K
- 2,873
- 1
- 16
- 31
1
vote
0 answers
Mac LaunchAgent PLIST not starting
I am trying to develop a Mac LaunchAgent and am testing with this, which should start the console:

Jeremy
- 883
- 1
- 20
- 41
0
votes
0 answers
How are timezone / daylight saving changes handled in launchd so that job is consistently executed at specific time of day?
How can I ensure my launch agent / scheduled job always runs at 20:30 UTC? This should be independent of
where the computer is located
daylight savings changes
current server timezone,
etc
I know there is a way to schedule jobs via the start…

maxipaddy
- 11
- 1
- 3
0
votes
0 answers
Send Message from Chrom extension to Launch Agent Mac
Is it possible to send message from chrome extension to a launch agent or to a daemon in mac ?

Siddhant Mishra
- 346
- 1
- 15
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
1 answer
OSX LaunchAgent for app that launches another app
I'm trying to set up a local LaunchAgent for cassandra and am running into an issue since bin/cassandra is just a shell script that launches:
/usr/bin/java -ea -javaagent:blah blah blah blah blah blah blah
My LaunchAgent launches the script but…
user578895
0
votes
1 answer
LaunchAgent cannot access macOS "protected" folders
I have a shell script which does this:
#!/bin/bash
ls -la "$HOME/Pictures/Photos Library.photoslibrary"
When I run this script in the shell it works fine. If I define a LaunchAgent (under $HOME/Library/LaunchAgents) which executes this script, I…

yan
- 2,932
- 1
- 23
- 25
0
votes
2 answers
LaunchAgent doesn't run shell script
Under macOS prior to Catalina I had a LaunchAgent that ran a shell script daily. After upgrading and switching to zsh it doesn't work. Things I've checked:
shebang switched to zsh
shell script can be executed manually from command line
sh has full…

quantixed
- 287
- 3
- 12
0
votes
0 answers
MacOS creating launch agent in a console app not working
I know how to create a launch agent with a normal application say "myLaunchd" and setting "Application is agent" to "YES" and then copying the "myLaunchd.app" to the main app's Contens/Library/LoginItems.
But I need agents, which will be created by…

Anoop Vaidya
- 46,283
- 15
- 111
- 140
0
votes
1 answer
Open terminal and run commands on Mac User Login
I am trying to automate a part of start up script that would open a terminal window that would run commands and display a bunch of text to user upon login.
I tried to create a plist in /Library/LaunchAgent that doesn't seem to do the…

Dennis Ninj
- 829
- 2
- 8
- 15
0
votes
0 answers
Run periodic tasks in the background after app terminates in MacOS
I am an iOS developer and I have developed an app that runs a periodic background task using Background Modes, I want to implement the same feature in the MacOS version of this app, as I am new to the MacOS development, I am facing some issue…

Anshuman Singh
- 1,018
- 15
- 17