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.

0
votes
1answer
31 views

macOS: why only few login elements are in System Preferences

In macOS, under System Preferences / Users / Login Elements there is a list of Login Elements that are started at the startup. Actually only few elements are listed here. There are many other ...
2
votes
1answer
52 views

Launchd process behavior

just wanted to ask a quick question I can't seem to find a straight answer to. What is normal "launchd" process behavior I should be seeing in Activity Monitor? Right now it is writing GB's of data ...
-2
votes
0answers
21 views

Setting up a launch daemon without an MDM

I have an install pkg I created that starts a system process named Company [being the name of where I'm at]. My network admins need a system process to scan for when a device tries to connect via ...
1
vote
2answers
65 views

How to set the python environment for LaunchDaemons

I have installed Python 3 via Homebrew, on my Mojave system, and have it symlinked to /usr/local/bin/python. I have a LaunchDaemon plist as follows: <?xml version="1.0" encoding="UTF-8"?> <!...
1
vote
3answers
51 views

osascript display dialog hangs when screen is off; detect unavailable GUI/display from bash or applescript?

background I've been working on a backup script that runs occasionally via launchd. When it runs, it prompts me with something like: osascript -e "display dialog \"Is now a good time to back up?\"" ...
0
votes
0answers
15 views

How to kill the routined service (temporarily or permanently)?

As per this question, routined is an Apple daemon that introduces some problems in High Sierra onwards: routined wants to use the "Local Items" keychain alert Experiments with killall over ...
0
votes
0answers
21 views

Where installer pulls environment variables from?

While looking over /var/logs/install.log, I've noticed that whenever I install a pkg, the installer first outputs a bunch of detected environment variables. However the env vars it outputs doesn't ...
2
votes
2answers
52 views

What are the various auto launch paths mean in OSX?

I'm trying to track down sneaky apps that launch upon reboot. They are not in System Preferences > Users and Groups > Login items and the in-app preferences for auto starting is disabled too for ...
1
vote
1answer
48 views

launchctl config file location?

I'm trying to configure a NetBoot image so that a script will automatically launch on the target machine after it boots from the image I've been using this article as a reference: https://medium.com/...
3
votes
2answers
107 views

What are the ways in which installed software can negatively impact OSX speed over time?

Applications installed on macOS are not always completely self-contained. Sometimes they write files in multiple locations outside their .app bundle, taking up space that they sometimes occupy even ...
1
vote
1answer
23 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
72 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
34 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
272 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
45 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
101 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
21 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
25 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
33 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
56 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
33 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
50 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
28 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
41 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
42 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
238 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
19 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
92 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
176 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 ...
3
votes
1answer
369 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
284 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
125 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
360 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
2answers
248 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
1k 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.
3
votes
1answer
1k 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
53 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
50 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
111 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
732 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
246 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
1k 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
80 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
215 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
71 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
527 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
22 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
78 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
51 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 ...