Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [launchd]

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

1
vote
2answers
26 views

How does installing software affect OSX speed over time (boot time, app launch time, responsiveness)? [on hold]

Constantly installing (and uninstall) software on my mac makes it sluggish over time, even when these programs are not momentarily running. In my experience macOS rots (slower than windows did in the ...
0
votes
0answers
10 views

Monitor Folder Contents with launchd - Including Subfolders?

I want to make a shell script that runs any time the contents of a particular folder on my server are changed. Seems easy enough at first, because launchd has a directive called WatchPaths which ...
0
votes
0answers
26 views

One job plist on Launchctl stop working with error: Service could not initialize: 17G5019: xpcproxy + 11472 [1524]

I've a user plist job working on my iMac for latest month, and work fine. But today stop of work. ~/Library/LaunchAgents/multimedia_search.plist <?xml version="1.0" encoding="UTF-8"?> <!...
0
votes
0answers
21 views

Invalid error on custom plist

My question is about a custom plist. I'm trying to load the following plist, but I keep getting the "invalid plist error" on macOS Mojave: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE ...
3
votes
2answers
87 views

macOS Mojave - locate not working

I got a MacBook from my work and wanted to use the locate command, but I get the message: WARNING: The locate database (/var/db/locate.database) does not exist. To create the database, run the ...
1
vote
0answers
27 views

How can I take a command line tool and program launchd to run it?

I am trying to get Offlineimap to run every 5 minutes with launchd. I do not know why it doesn't work and the log file is not written on the specified location. I am running MacOS Mojave on a 2018 ...
0
votes
1answer
42 views

Launch daemon not running on boot

I've been following the migration guide for macOS Server and have gotten stuck with the launch .plist for the BIND (named) DNS server. If I name the file the recommended org.isc.named.plist the ...
0
votes
1answer
14 views

Launch homebrew.mxcl.dnsmasq when NIC becomes available?

I am running homebrew dnsmasq on my Mac. Dsmasq is configured to only respond to traffic on one NIC (en7). en7 is a usb-c ethernet adapter. When this adapter is not active (not plugged in, switch ...
1
vote
1answer
18 views

Triggering Launch Agents for path in sandboxed app using WatchPaths does not work

I am trying to create a user LaunchAgents that will trigger a script when a path managed by a sandbox app will change (in my case, when /Library/Containers/com.omnigroup.OmniFocus3/Data/Library/...
0
votes
0answers
20 views

Verify and load mDNSResponder plist file

As mentioned here, in my macbook only chrome is able to resolve any given host but any other application is not able to do it. As mentioned in the answer, I tried to edit the file and unload/load the ...
1
vote
1answer
39 views

Where does the stderr from launchd go?

launchd items in /Library/LaunchDaemon may redirect stdin/stdout/stderr. E.g. I've got an item that says: <key>StandardOutPath</key> <string>/Library/Logs/rnamanagedocker_out....
0
votes
0answers
24 views

Launch daemon does not run at boot, but will run when loaded by hand

I have a launchd daemon definition /Library/LaunchDaemons/homebrew.mxcl.docker-machine.plist which contains: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD ...
0
votes
0answers
28 views

“Error: 0xFFFEFA0A -67062 code object is not signed at all” when trying to launch docker-machine by LaunchDaemon

I am trying to get Docker installed on macOS High Sierra. I've installed Docker via brew, I can start the docker-machine when logged in as root (sudo -i -u root). But when I use LaunchDaemon the ...
0
votes
1answer
24 views

Running launchd agent not preventing macbook from sleeping

I have an agent/daemon that runs a backup script (I use restic) at 4:05am on a StartCalendarInterval. My understanding is that if a launchd agent is running, that should prevent osx from sleeping. Is ...
1
vote
1answer
30 views

launchd is not passing arguments to my PHP script

I'm having a weird problem. I use launchd to run a bunch of shell scripts that update content on my site. It was working fine when it was just calling scripts normally. But now I made the script a ...
0
votes
1answer
18 views

What is the difference between Interval and ThrottleInterval in launchd.plist

I found Interval key in /System/Library/LaunchDaemons/com.apple.periodic-daily.plist from my MacOS 10.13.6. But I fail to find what Interval is by googling. Even man launchd.plist does not have this ...
1
vote
2answers
153 views

Launchd running an Applescript every two hours

I have written a small applescript that I would like to run automatically every 2 hours. I have thus written the following launchd daemon (probably it is an agent): <?xml version="1.0" encoding="...
1
vote
0answers
15 views

How can I use launchd to auto update brew? [duplicate]

I followed the instructions on the page Creating Launch Daemons and Agents and created (as root) my own plist file named com.personal.brew.plist and located in /Library/LaunchDeamons/: <?xml ...
1
vote
0answers
73 views

macOS Mojave launchd regular interval script - error is always “Found non-key inside <dict> at line 11”

The .plist in question is at the bottom but I can't find a way to run it every 7200 seconds. Checking it produces the same error. I have tried various versions taken from the StackExchange such as: ...
3
votes
1answer
146 views

How to I stop a launchd script from running on wake

I have a simple launchd script that plays a sound every 30 minutes and it runs out of the user library ~/Library . It doesn't run if my machine is asleep, but does run the last event missed when the ...
2
votes
1answer
144 views

How to or Is that possible to stop mDNSResponder without disable System Integrity Protection?

I have tried the following: $ sudo killall -HUP mDNSResponder $ sudo killall -9 mDNSResponderHelper mDNSResponder $ sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder....
1
vote
1answer
158 views

Mojave plist error: Path had bad ownership/permissions

I'm trying to mount a fileshare at boot. I copied the plist from a 2012 mini (where it ran fine) to a 2018 mini, both running Mojave. On the new mini I'm getting the error: Path had bad ownership/...
1
vote
0answers
71 views

Auto logout inactive users

My iMac is set up using Parental Controls to limit how long my kids can use it. When their time is up, they are no longer able to use the iMac. However, their accounts are not logged out, and ...
-3
votes
1answer
256 views

How do I resolve a “Executable not found!” error?

I have upgraded from macOS 10.13.4 to macOS 10.14.1 (18B75) on a Mac mini (Late 2012), and now have one orphan file, and the corresponding Executable not found. /System/Library/LaunchDaemons/com....
-1
votes
1answer
139 views

Unable to Locate or update LocateDB Mac OS El Capitain, Sierra, High Sierra, Mojave!

Over the past few operating systems I've been noticing a trend, especially after Apple screwed around with the real and fake "root" user in El Capitan. Most especially, using the locate command. ...
5
votes
5answers
805 views

How to run a LaunchAgent that runs a script which causes failures because of System Integrity Protection

After upgrading to Mojave, my rsync based backup script run via a launch agent in ~/Library/LaunchAgents, could no longer read some directories in ~/Library.
4
votes
1answer
907 views

How to prevent the Photos app from launching cloudphotosd, photoanalysisd, etc?

A number of the background services used by the Photos app perform functions I'm not interested in benefitting from (and in some cases, actively do not want). Primarily these are photoanalysisd and ...
1
vote
1answer
33 views

Want to launch dnsmasq ony when Thunderbolt Ethernet is active

dnsmasq is installed using homebrew. Currently dnsmasq is spamming my system.log with messages like this: Sep 26 18:22:46 Laptop com.apple.xpc.launchd[1] (homebrew.mxcl.dnsmasq[14526]): Service ...
1
vote
1answer
35 views

What is the best practice for a daemon application running as root that needs access to the GUI? [closed]

I'm porting over a C++/Qt application from Windows. On Windows, the program runs as a service. It's discouraged from programs running as a service to also interact with the user and display GUI ...
3
votes
1answer
87 views

Can I change launchd program arguments based on calendar interval?

I'm trying to run a script (zfssnap.sh) to automate snapshots, but one of the arguments needs to change based on which time entry triggers the script to start. With cron, I would just add a new line ...
1
vote
1answer
426 views

Cannot kill Bitdefender process after uninstalling it, no launch daemons found

Recently, I installed Bitdefender Antivirus. I wanted to remove it after the trial period. After uninstalling it via CCleaner, moving all stuff from Librar, I found there is still an agent up and ...
6
votes
2answers
224 views

Why can an app create daemons on the fly without sudo permission and how to stop it?

First, I come from Linux so there are many things which confuse me such as daemons. I installed VOX.app and it has some kind of agents and cloud-related processes which can be started automatically. ...
4
votes
2answers
795 views

What does launchctl unload actually do?

When running launchctl unload some.plist, what is this command translated to specifically, in terms of UNIX commands, etc. There is nothing in .plist files that specifies any "command line to run ...
2
votes
1answer
69 views

Cannot load rsync daemon in Sierra. Log shows: “assertion failed: 16G1408: libxpc.dylib”

I'm trying to start rsync --daemon on Sierra (10.12.6), using launchctl. It used to work fine (last time in Mavericks, I think). But now on Sierra, the daemon does not start and grep rsync /var/log/...
2
votes
2answers
140 views

Difference between System and Global Daemons

According to the Launchd Tutorial, there are two places where a daemon can be. A global daemon located at /Library/LaunchDaemons A system daemon located at /System/Library/LaunchDaemons What is the ...
2
votes
1answer
69 views

Run backup script at any time every weekend (using launchd?)

I recently lost configuration of one of my IDEs (deleted it myself, I am very smart). I had a backup but it was a few months old. I have a script to backup all my config and push it to GitHub. I was ...
1
vote
1answer
385 views

Run an AppleScript daily with launchd

I'm trying to run an AppleScript which ejects all drives (from the excellent answer by Monomeeth here) daily at 8 am using launchd. After some searching, I decided the best way to do this was by using ...
0
votes
0answers
20 views

I want to start and stop a network service based on whether the host is receiving udp packets on a particular port

I'm vaguely familiar with launchd and plist files. I've used these (in the distant past) similarly to cron scripts to run stuff periodically. But I understand they can also do "on demand" things. I ...
1
vote
1answer
67 views

`launchctl export` command not working?

According to the man page of launchctl, there is an export command: export Export all of the environment variables of launchd for use in a shell eval statement. However, when I try to use ...
0
votes
0answers
40 views

Can a password for an API be secured on a Mac but usable through a script?

I enjoy using launchd, JSON Helper and AppleScript to run hourly pulls for API information I need but I'm required to manually enter an username and password. I don't mind the username as text in the ...
0
votes
1answer
23 views

LaunchAgent loads app but clicking app icon doesn't

I have an issue where I installed an app, the installer completed with no apparent errors, the app launched immediately after installing, but afterward if I click the app icon in /Applications the ...
2
votes
1answer
227 views

How to run a one-liner shell command using launchd?

Below is an example of what I'm trying to do: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0....
2
votes
1answer
922 views

How do I enable ntpd to serve ntp clients (using High Sierra)?

I have some raspberry pi computers on a private network which do not have real time clocks and thus cannot keep time accurately after they are shut off. Because they are disconnected from the internet,...
6
votes
2answers
304 views

launchd listening on port 4444

the lsof command tells me launchd is listening on port 4444: $ sudo lsof -i tcp:4444 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME launchd 1 root 32u IPv4 0xfe4e7e9bb5c1a5 ...
1
vote
1answer
96 views

Why won't launchctl automatically load my plist entries?

I have put several plist entries in /Library/LaunchDaemons all configured to run at load. However, after booting, none of them load up automatically. Every other script in this directory loads ...
3
votes
0answers
46 views

Why is an application running so slowly when started with launchctl?

I've written an application in C++, using OpenGL and Cinder. When I launch the app file from the Finder, it runs nice and smoothly at 60FPS. However, when I launch it using launchctl load the ...
1
vote
2answers
3k views

Make sysctl changes at startup

I'd like to change the default smb settings at startup to remove timeouts. I have the following script; #!/bin/sh sysctl net.smb.fs.kern_deadtimer=0 sysctl net.smb.fs.kern_hard_deadtimer=0 sysctl ...
2
votes
1answer
117 views

launchd startInterval shorter than time taken for the script to complete

I'm using launchctl to load/start my python script and it works to a certain degree. It launches ever 120s, but some times my script takes 500s to run and my theory is that is I have a process running ...
4
votes
2answers
93 views

error code 4960 when saving a .plist

I'm trying to create a .plist file in textwrangler, something I've never done before. I'm using these instructions which tells me to: Save code as com.rTask.plist file under path ~/Library/...
1
vote
0answers
62 views

Junk log files filling HD

Sometime last night, the directory /private/var/db/uuitext/dsc on my Macbook Pro started filling up with junk files until the HD was completely full. Each one is 40.9MB and has a name of the pattern ...