Skip to main content

Questions tagged [launchd]

A system for starting, stopping, and managing automated processes.

Filter by
Sorted by
Tagged with
2 votes
0 answers
45 views

Launchctl plist with StartCalendarInterval not executing

I have a plist which runs a script and if I launch it using StartInterval it runs the script but if I use StartCalendarInterval it doesn't run the script. Further details are: The plist is below and ...
webby's user avatar
  • 21
1 vote
0 answers
34 views

What is the proper way to stop and restart a service that is a "bundled daemon"?

There are some recent apps, e.g., Cisco Secure Client / AnyConnect VPN service, where the service cannot be stopped/started using the LaunchControl.app. For more control over what's running on the ...
HanSooloo's user avatar
  • 334
0 votes
0 answers
26 views

Gaining access to `~/Library/Mobile Documents` in a launch agent

I use restic for computer backups on macOS Sonoma. I have a shell script that invokes the restic binary with custom arguments. To make a backup, I run the shell script manually in the terminal, ...
Philip's user avatar
  • 553
0 votes
0 answers
375 views

Launchctl "Bootstrap failed: 5: Input/output error" when targeting system

I'm trying use launchctl run a small program, but have not been able to consistently target system. What appears to be happening is target gui, then target system, try to target system, it'll give ...
ron burgundy's user avatar
0 votes
0 answers
60 views

Shell script can't be executed by LaunchDeamon or LaunchAgent

macOS 14.2.1 (23C71) I have this shell script which copies a folder to an external hard drive using rsync: #!/bin/bash SOURCE_DIR="/Users/tristan/Library/Application Support/Postgres/var-16"...
QGuy's user avatar
  • 11
3 votes
1 answer
87 views

How do I run a .sh file every day at 2:30 AM? [duplicate]

I have a launchd plist located at ~/Library/LaunchAgents designed to run a script located at /Users/admin/Downloads/testing.sh The script is : #!/bin/bash osascript -e 'tell app "Terminal" ...
John Hat's user avatar
1 vote
0 answers
53 views

Could there be any negative repercussions in disabling com.apple.ftp-proxy.plist? [duplicate]

I noticed there was something listening on port 8021 on my Mac. $ sudo lsof -i ':8021' COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME launchd 1 root 38u IPv6 ...
mr.zog's user avatar
  • 133
0 votes
1 answer
119 views

LaunchDeamon file doesn't work [duplicate]

I have a .plist file in the LaunchDeamons directory. It's supposed to run a .sh file (which works) which creates a backup of a directory onto an external drive every day at 00:00. I have tried putting ...
QGuy's user avatar
  • 11
1 vote
1 answer
260 views

Why does macOS start ssh-agent with -l?

I'm looking to add a default timeout to the ssh-agent run by macos at startup. So far I've determined that the file that runs this is /System/Library/LaunchAgents/com.openssh.ssh-agent.plist which ...
Joel Berger's user avatar
1 vote
1 answer
81 views

Is there any way to prevent a non-admin user from executing "launchctl unload" on macOS?

I started using a well-known program for self-control on MacOS called Cold Turkey. This program is very powerful, but it's not enough since I can open a Terminal as a non-admin user and execute the ...
Alfred's user avatar
  • 11
2 votes
1 answer
79 views

Is launchd confined by SIP or AMFI?

Given that signature checks for kernel extensions and executables are both carried out in userspace, this tells me that SIP and the sandbox aren't running when launchd is still the only process ...
Melab's user avatar
  • 989
0 votes
0 answers
42 views

Why failing to unload com.apple.sharingd.plist with launchctl nor with sudo nor with root?

[MacOS Monterey 12.7] sharingd looks related with a weird window flash popup on desktop right after booting. As I researched, this daemon has to do with services that I don't need (AirDrop, Handoff, ...
nostromo's user avatar
  • 197
1 vote
1 answer
122 views

Disabling services (daemons, agents) with launchctl

I want to get rid of some system services completely. I turned off sip with csrutil disable. Then following command sudo launchctl disable com.apple.cloudphotod Gave me an unexpected answer: ...
Andrew Orlow's user avatar
0 votes
1 answer
49 views

How to make this script successfully trigger at a certain time?

I'm not an AppleScript coder or a technical person by any means but I have done some research and came across a solution for my problem statement. My problem statement How to make a mouse click ...
Anshu Chang's user avatar
1 vote
1 answer
33 views

Make a login/logout script in mac [duplicate]

What would be the best way to log login, logout and the user that is logging into the mac? I have some machines which I control from remote desktop. I want to monitor who is logging into them and what ...
Saikat Karmakar's user avatar
0 votes
0 answers
13 views

How do I start a launch agent for an AD user?

I have a Launch Agent which is working fine for local Mac users. But it is not starting for AD user. As we start a LaunchAgent using launchctl bootstrap <gui/$user_uid> <plist path>. But ...
vishal kumar's user avatar
1 vote
1 answer
35 views

DisplayLink v1.10 - LaunchDaemon?

I recently upgraded to Ventura from Catalina and I use DisplayLink for an external monitor. I have a script that took care of stopping and starting the DisplayLink daemon and user agent services on ...
Peter B's user avatar
  • 121
0 votes
0 answers
35 views

How to prevent "Background items added" notification when running shell script with launch agent

I created a custom .plist file to run a simple startup.sh script when I log into my user, and added it to my /Library/LaunchAgents directory. Everything works as intended, however, every time my ...
adamanti's user avatar
-1 votes
1 answer
41 views

Zabbix agent daemon does not pickup a PID

(I've searched similar cases and could not find any) I've installed Zabbix agent daemon for MacOS. I'm running it on Catalina. The daemon ran just fine on installation, however after a while it ...
mariano-daniel's user avatar
2 votes
0 answers
48 views

Raise ulimit for ssh-agent on Sonoma

I'm running into an issue where I need more than 256 open ssh connections for a deployment pipeline. This process stalls when ssh-agent runs into the file limit. I've raised the limit via launchctl ...
Michael Conlen's user avatar
3 votes
1 answer
21 views

Creating User Accounts with Puppet/Missing ACLs

Currently we use Puppet in my environment to provision a user account seen here and here Recently we noticed on macOS 13 that the user account created were missing ACLs. I believe the missing ACLs are ...
Ryan Curran's user avatar
2 votes
0 answers
95 views

How to override or disable launch agents in /System/Library/LaunchAgents?

There's a longstanding and widely-reported issue with an Apple process (photolibraryd) that keeps creating a file called Photos Library.photoslibrary in the trash every few minutes. The process is ...
Oscar's user avatar
  • 182
1 vote
0 answers
69 views

My launchd scripts are not run after boot but after login

I want to start a shell script when a MacOS (14.2.1) machine boots. But the scripts is executed only when I log in, not directly after the system has started. I wrote a plist definition like this: >...
Christian Halstrick's user avatar
0 votes
1 answer
50 views

Can restic backup macOS Photos library from launchd? [duplicate]

When I run restic from a commandline with sudo it is actually able to backup my Photos library. But this is probably because I have given Terminal full disk access. I am actually starting restic from ...
gctwnl's user avatar
  • 714
3 votes
1 answer
250 views

How can I troubleshoot when the locate database isn't built on macOS?

I”m struggling to have a locate database built on my Mac to index all files under /opt. $ locate locate WARNING: The locate database (/var/db/locate.database) does not exist. To create the database, ...
xpt's user avatar
  • 405
0 votes
1 answer
43 views

Running Typescript from Launchd

I would like to run a TypeScript script from a launchd. I'm successfully running the script directly using npx ts-node /path/to/script.ts However I can't figure out how to code this into the plist ...
Ben Robinson's user avatar
1 vote
2 answers
66 views

Is there a way to restart a launchd service if it stops responding on a port?

I have a service configured via launchd to automatically restart when it crashes. Unfortunately it will sometimes hang, and stop working, without actually crashing. I can detect when this has happens ...
DNS's user avatar
  • 153
1 vote
0 answers
52 views

Cron and launchd rsync/ssh job do not work when screen is locked

I have implemented a bash script to perform a backup to a remote server over ssh using rsync. Running the script in the terminal works correctly. I then scheduled a crontab job to run this script ...
Alan M.'s user avatar
  • 11
2 votes
1 answer
200 views

How do you undo a "launchctl bootout" command to disable the media keys?

I tried out the set of commands listed in this answer while setting up a new MacBook Pro on Sonoma 14.1.2. The below command worked and disabled the media keys - $ launchctl bootout "gui/$(id -u &...
adiah80's user avatar
  • 21
1 vote
0 answers
27 views

What launch program is WeMeetRoomsDaemon?

I just purchased a new mac book pro computer and transferred the information from my old computer. The first thing I saw was notifications popping up saying that programs are being setup to run in the ...
Justin zhang's user avatar
0 votes
0 answers
48 views

How to find out when a launchd launch agent will run next time?

On Linux, the systemctl list-timers command returns something like this: NEXT LEFT LAST PASSED UNIT ACTIVATES ...
Alan's user avatar
  • 1
1 vote
0 answers
48 views

Having period job to remove temporary files

I've defined a periodic plist which runs a bash script. The plist is placed in the local library and script is also place in /usr/local/bin. It successfully run the script on the defined period but it ...
Parham Alvani's user avatar
3 votes
1 answer
306 views

What is qemu-system-x86_64 from launchd and why does it want to "accept incoming network connections"?

I had this pop up unexpectedly (MacOS Ventura 13.5.1, Intel i7 MacBook Pro): Do you want the application “qemu-system-x86_64” to accept incoming network connections? No recent updates or new ...
user56reinstatemonica8's user avatar
3 votes
0 answers
2k views

How to set PATH for all applications on a per-user basis?

I'm looking for a way to set the PATH environment variable for all applications that I (and only I) run under macOS (version 14 / Sonoma at the time of writing.) That sounds like it ought to be ...
Eric Anderson's user avatar
2 votes
0 answers
108 views

launchd job returning 2 but works fine in terminal

I'm trying to write a bash script to clean up my Downloads folder every day at a certain time. The bash script should get called then a python program afterwards to do the cleanup. I'm using launchd ...
A-A's user avatar
  • 21
1 vote
1 answer
188 views

How to register some program "at login" for all users on macOS

I know I can use "Service Management" (SMAppManager) for the current user [or do the equivalent action via setup], but it only registers at login for the current user, but I need my app to ...
Aleksandr's user avatar
1 vote
1 answer
515 views

Cannot ssh into machine?

I have a Mac that for some reason I cannot manage to ssh into anymore. I'm completely stumped and am looking for ideas of what to try next (short of reinstalling the whole system). I've tried the ...
Martin's user avatar
  • 138
6 votes
1 answer
1k views

Trying to kill a malicious launchd process

I've got a malicious process which I'm trying to remove. I've tried the following but each time it gets regenerated/restarted: kill -9 deleting the plist file launchctl disable launchctl unload Is ...
George's user avatar
  • 271
1 vote
0 answers
276 views

How to mount external SSD with encrypte APFS volume very early during boot?

I have an external SSD connected to my MacBook Pro (2021, M1, macOS Vetura). On the external drive is an encrypted APFS partition. I installed some huge applications to that external drive to save ...
Mecki's user avatar
  • 931
1 vote
1 answer
38 views

LaunchCtl Access script in library folder

I have this launchctl item which runs every day to backup some config files. The script is located in my Dropbox folder. It use to work. However, since Dropbox is now located at ~/Library/...
Scott Walter's user avatar
  • 2,325
0 votes
0 answers
482 views

Disable Siri fully via terminal Ventura

What is the latest way to disable Siri via Terminal on Ventura? I'm ok to do SIP disable and re-enable later. I have tried sudo plutil -replace Disabled -bool true /System/Library/LaunchAgents/com....
Marius's user avatar
  • 101
0 votes
0 answers
174 views

On Ventura, running rsync from launchd gives permissions error

This problem is similar to questions at the following: rsync errors, but only when run in launchd rsync "Operation not permitted (1)" error only when run in launchd Permissions errors when ...
Jeffrey Simon's user avatar
11 votes
3 answers
4k views

How to increase global max opened files limit on OSX 13.5 Ventura

I already had configured max opened files limit and it worked fine until I updated to Ventura 13.5. The limit is reset to default value now. I tried to follow answer from this question: How to ...
Mugenor's user avatar
  • 111
0 votes
0 answers
87 views

launchctl agent not starting jobs that involve external volumes [duplicate]

I am new to lanuchctl. On my Mac running macos-ventura, I have created several plists that all load fine but will not run (neither by launchctl start nor by specifying RunAtLoad in the plist. (Thanks ...
Dennis 's user avatar
  • 115
1 vote
1 answer
135 views

Script can access SQLite database in ~/Library when run from Terminal, but not when run from launchd

I have a script that processes my screen time data using the SQLite database /Users/USERNAME/Library/Application Support/Knowledge/knowledgeC.db. The script runs fine when I launch it manually via ...
ahalbert's user avatar
  • 113
0 votes
0 answers
378 views

Possible method to mount a Linux SMB share on macOS Ventura before user login

I am trying to mount a Linux SMB share onto a macOS machine running Ventura 13.4. I must have the share mounted after the macOS machine bootup is completed, but before any possible user has logged ...
Sam Marrocco's user avatar
3 votes
2 answers
215 views

Can I use the output of a shell script to set env vars from launchd?

I'm using launchd to set an env var at startup using launchctl setenv. The script works fine when the variable is hardcoded in it, but unfortunately I need to get this variable dynamically at startup ...
VMX's user avatar
  • 41
3 votes
1 answer
1k views

"financed" process in Activity Monitor

I noticed a process in Activity Monitor called financed. If I turn on the Kind column it shows "Apple" but so do all the other processes. If I use the hierarchical view no parent or children ...
Dennis Williamson's user avatar
2 votes
1 answer
485 views

How can I prevent SubmitDiagInfo from using high CPU?

I have a problem where the process SubmitDiagInfo uses high CPU on an regular basis (see screenshot). Killing the process and restarting the computer has no effect. I tried unloading the service ...
Kurt's user avatar
  • 431
0 votes
1 answer
219 views

launchd exit status "-9"

I have a couple of launchd jobs starting a rsync wrapper script. They have been running fine for at least 3 years, but now most of them fail with exit status -9. All jobs are configured like this (...
janeden's user avatar
  • 121

1
2 3 4 5
16