Questions tagged [launchd]
A system for starting, stopping, and managing automated processes.
699
questions
0
votes
1
answer
40
views
Jenkins Slave on Mac Mini doesn't start with plist
I am trying to setup Jenkins Slave on mac mini. Have created /Library/LaunchDaemons/com.jenkins.ci.plist with following contents
<?xml version="1.0" encoding="UTF-8"?>
<!...
0
votes
0
answers
18
views
How to Disable gamecontrollerd Service?
I want to disable the service com.apple.GameController.gamecontrollerd. There is a thread on this topic here:
https://discussions.apple.com/thread/252046047
However, the commands that are shown are ...
1
vote
0
answers
47
views
How to `kill -HUP` apps in macOS 12+?
Long ago it was relatively simple to kill and start some apps and processes in macOS by issuing a killall -HUP PROCESS_NAME. It seemed that most apps and processes respected the -HUP signal, but that'...
1
vote
1
answer
46
views
How can I execute a function defined in bash profile, from a launchD plist file?
I want to run a function defined in my .bash_profile file.
How do I execute this function from launchd?
Here is my plist file, 'backupIf' is my function. In my launchd GUI editor it tells me 'no such ...
0
votes
1
answer
38
views
Disable/enable launchd daemon/agents
There are several launch daemons/agents that start automatically and I wish they will not start automatically.
I have listed some services by running
$ launchctl list | grep -i 'safari\|siri\|photo\|...
0
votes
1
answer
45
views
Problems with searching in finder, spotlight and file-management on Mac
I got some problem with indexing of disk, Spotlight, searching in finder and file-management.(MacBook m1 2020)
Finder is loading a lot of time, searching in it does not work, Spotlight does not work ...
0
votes
0
answers
9
views
How to show dnsmsaq logs in apple unified log
Dnsmasq has the option to log queries to a file or the syslog. Logging queries to a file is way too verbose and fills the disk very quickly, so I need to use the syslog facility.
Since (at least) Big ...
0
votes
1
answer
44
views
I need help translating this cron job into launchd
How do achieve the following cron job into launchd xml format?:
* * * * * date > /Users/mariano/cron_test.log
I've been trying in several ways, but I don't seem to be getting the ProgramArguments ...
0
votes
1
answer
41
views
launchctl gives "Invalid property list" error, but plutil validates "OK"
mariano@host LaunchAgents % plutil local.test.plist
local.test.plist: OK
But then:
mariano@host LaunchAgents % sudo launchctl load local.test.plist
Password:
/Users/mariano/Library/LaunchAgents/...
0
votes
0
answers
41
views
Debugging phantom zsh process
Every once in a while (once a week?) I noticed that my mac's fans are spinning full speed. When I investigate my processes on activity monitor I notice a zsh process consuming near 100% on the cpu. ...
0
votes
1
answer
178
views
SSH Issue: kex_exchange_identification: read: Connection reset by peer
MacBook Pro 15" 2018, 32G RAM, OS 12.3
Last week I was trying to connect a PHP script to a database on my web host via SSH, and ran the following script:
<?php
shell_exec("ssh -f -L ...
0
votes
1
answer
32
views
How do you load and start a launchd job without using a plist file?
The manual page for launchctl mentions that the load and unload subcommands are legacy subcommands, which implies that they're no longer needed for loading and starting a launchd job.
However, I'm not ...
0
votes
0
answers
56
views
Can't disable sharingd
I'm trying to disable sharingd service,
Tried to run both as root and normal user
%> sudo launchctl unload /System/Library/LaunchAgents/com.apple.sharingd.plist
Warning: Expecting a LaunchDaemons ...
0
votes
1
answer
22
views
Can't use System Events when using Launch Daemons and Agents
I'm writing a little Go program that uses osascript (based on mac2mqtt):
func getCommandOutput(name string, arg ...string) string {
var outbuf, errbuf strings.Builder // or bytes.Buffer
cmd := ...
0
votes
1
answer
35
views
How to launch terminal session and run on launch. macOS
I want to launch two terminal sessions and run a command in each on launch in macOS.
I want the graphical terminal to launch, I'm not after a launchagent that runs in the background.
Is this possible?
...
0
votes
1
answer
37
views
How can I trigger a mac daemon on an event other than scheduling a time interval?
I have made a few Mac daemons in the past. They either run at launch or run at a specific time interval, for example, once every hour.
I would like to know if it's possible to run a program on an ...
0
votes
0
answers
32
views
Daemon Starting as Root
I created a plist for a service I'm trying to run. In it, I put:
<key>UserName</key>
<string>_mydaemon</string>
For some reason, the daemon starts as root rather than as ...
0
votes
1
answer
29
views
How to prevent Visual Studio from creating coredumps when my program crashes?
I am using Visual Studio 2022 for Mac Preview version 17.0.
It runs well but a problem I'm having is that after every error, when running the program (in my case a simple console app), it creates big ...
0
votes
0
answers
18
views
How do you set the maximum core dump size in a way that will affect programs started from the dock?
The Title pretty much says it all, but here's what I tried:
I tried running "ulimit -c unlimited" in a shell, but of course the only helps subprocesses of that shell.
I tried setting up a &...
0
votes
1
answer
29
views
launch agent launches my task every 10 seconds even though the StartInterval filed is set 60
I want to execute a script in every 60 seconds. I made a .plist file as follows
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0/...
0
votes
1
answer
29
views
Access External Volume Before Interactive Login
We are running a node service that needs to access an external volume (USB HDD).
We've found that when we reboot the system and start the service via a plist in /Libary/LaunchDaemons our external ...
0
votes
0
answers
18
views
Failing to download an iCloud Documents and Desktop file using brctl and launchd
This is currently a launchd question but I'll include the backstory in case there's a different solution not involving launchd.
I keep my Alfred preferences in iCloud Documents and Desktop (against ...
1
vote
0
answers
637
views
httpd showing in error state with brew services list on MacOS Monterey
When I look at my services installed with Homebrew Apache is always in an error state. When I do a syntax check on my Apache config it is fine and Apache is serving up content fine.
It's only a minor ...
1
vote
1
answer
169
views
Launchd service logs?
I need to create a service in macOS Monterey but sudo launchctl start myservice does not work, my app won't start it seems, I don't know why. Where are the logs? In Linux I just use journalctl, but is ...
0
votes
1
answer
39
views
Is there a way to restrict a process with certain name from spawning?
Upon launching, the Reverso app spawns two processes - Reverso (the app itself) and the annoying Reverso Helper, which occupies the menu bar with its icon and remains active even after cmd+Q -ing the ...
2
votes
0
answers
110
views
How To Establish A Persistent SSH
At home I have a 2017 iMac running Big Sur and a couple of Raspberry Pi 4s on Buster. At my condo I have a 2010 MacBook and two more Pi 4s on Buster. The machines at the condo are behind a double NAT. ...
0
votes
0
answers
28
views
Macbook Pro M1pro display process launching log when system restart
I just killed process launchd carelessly with Process Viewer Application. As soon screen is black and restart.So when I restart my macbook ,it likes the image which displayed all process launching log....
1
vote
0
answers
52
views
Is there a tool (built-in or not) to parse `launchctl list` output to get one string?
I want to run a script based on one line in launchctl list output. I know there are ways to simplify this output using awk sed grep etc. The question is, is there a native or non-native tool for ...
-1
votes
1
answer
51
views
What does `man launchctl` means?
I'm trying to run this line in the terminal.
launchctl bootstrap "gui/$(id -u "${USER}")/com.apple.rcd"
But I'm getting the following error:
Please refer to `man launchctl` for ...
0
votes
0
answers
22
views
How can I get `at` to execute `say`? Currently getting Open speech channel failed: -915
I'm on Monterey. I have enabled atrun, and it works. But when I do this:
$ at now + 1 minute
say "hello"
<C-d>
at -l lists the job, but when the time comes, it doesn't speak, and I ...
0
votes
2
answers
554
views
Running Launchd Services with Non Root User on macOS
I am building a launchctl service which can run a java service. I am able to create launchctl service with root user and test start/stop/status/automatic start at reboot use cases.
I am struggling ...
0
votes
0
answers
28
views
How can I automatically kill sshfs on sleep? [duplicate]
I'm regularly using sshfs to mount a remote filesystem on my MacBook. However, sshfs doesn't survive when I close the lid of the laptop and open it again. Instead, all internet connections are blocked ...
2
votes
1
answer
568
views
What is morphunassetsupdaterd?
I haven't noticed this process earlier.
Process: morphunassetsupdaterd [2684]
Path: /usr/libexec/morphunassetsupdaterd
Load Address: 0x105960000
Identifier: ...
0
votes
0
answers
20
views
How to `launchctl` start a daemon for testing? (without loading it, so if the device restart, it does not reload it)
For loading temporally a daemon, without it to be reloaded the next start, I was used to:
$ sudo launchctl start ./myplist.plist
However, this doesn't seems to work anymore (or maybe id never did, ...
0
votes
1
answer
694
views
sudo: launchctl: command not found
I am trying to start my music app, both launched and playing, and a few other tasks, at a certain time. I wrote an applescript that runs after my vpn connects, so I know the apple script is good.
I ...
4
votes
0
answers
259
views
launchctl: Unrecognized target specifier
I think that at one point in the past I disabled my media keys using the instructions provided in this answer. I am trying to re-enable them, but upon using the command:
launchctl bootstrap "gui/$...
1
vote
0
answers
32
views
How to schedule and run a cron/launchctl job that will wake computer if asleep
I have a script that performs a backup of my PhD data using rsync. The rsync is performed between my laptop and a home server I have running. The broad idea here is that I normally use my server to ...
0
votes
0
answers
18
views
Automatic app relaunch via `launchd` causes flash of second menu bar app icon
I'm using a launchd script found here to automatically re-launch an app if the app crashes:
Automatically relaunch a closed macOS application
The app has a menu bar icon. After running that script ...
0
votes
0
answers
27
views
Automatically relaunch VirtualBox VM when it crashes
Is there some way to automatically relaunch a VirtualBox VM if it happens to crash?
My VM occasionally crashes and has to be relaunched which I can do manually when I'm at my computer, but I'd like ...
1
vote
1
answer
153
views
How to disable a broken brew service?
For the moc music player I have installed jack and started it as a service with:
brew services start jack
This causes jack to be startet at login. It works for moc, but unfortunately it seems that ...
0
votes
1
answer
44
views
How to set default nice value for a particular process that is started by launchd?
I want to set the custom priority level (i.e. nice) to a particular program as the default priority level. The tricky thing is that the process is not started by me but by background processes not ...
0
votes
1
answer
78
views
Why do I have to keep reloading the SSH daemon?
This on a 2017 iMac running Big Sur (11.6) with OpenSSH_8.1p1, LibreSSL 2.7.3.
I sometimes have a need to log in to this machine remotely. I have forwarded the port appropriately.
But, sometimes I get ...
0
votes
0
answers
63
views
How can I run `launchctl asuser` over a SSH session?
I am SSH'ing into my Mac and I want to get the value of SSH_AUTH_SOCK from launchctl.
Normally, I would do that like this:
% launchctl getenv SSH_AUTH_SOCK
However, when you SSH into your Mac, this ...
0
votes
0
answers
39
views
Running a daemon before a .app program is invoked and shut it down after the app has been closed
I am using Cisco AnyConnect for connecting to client VPN which relies on a set of agents and daemons.
Because I don't like daemons running when not needed, especially the ones related to networking, I ...
0
votes
1
answer
114
views
macOS Big Sur 11.6 Stocks app opens autonomously and I don't know why
The Stocks app on my iMac opens (apparently) on its own, in the background, multiple times per day. The only info I can find is from syslog:
Oct 19 11:05:03 myHostname com.apple.xpc.launchd[1]: ...
0
votes
0
answers
26
views
Launch Daemon to keep me logged out between certain times
I'm currently trying to figure out how to better control the time I spend on my laptop in the evenings, but for reasons I'll spare you, I'm not having a lot of success. I'm finding that the OSx ...
1
vote
0
answers
48
views
Want to remove filevault prompt on shutdown/reboot
Whenever I'm logged in as a certain user and trigger a shutdown or restart, I get prompted to enable filevault. I have searched everywhere to find the hook that causes this prompt, but I can't find ...
1
vote
0
answers
27
views
Launch applications at login only for specific user, not shown in "Login Items"
To summarize, I want to make applications that launch at login launch only for specific user. They are not shown in 'Login Items' in System Preferences, but in /Library/LaunchAgents/ and /Library/...
2
votes
1
answer
157
views
Cannot remove GT8P3H7SPW.com.mcafee.CMF.networkextension service from launchd
ref: Consent needed to enable ENSM Firewall 10.7.5 and later
This system extension was left over from a McAfee LiveSafe install that I had removed using the provided uninstaller.
I had to disable it ...
1
vote
0
answers
21
views
launchDaemon choose shared file location that doesn't require full disk access
I've got an mach-o executable that runs from launchDaemon plist file, and is communicating with other processes using unix domain socket. The file that backs this socket created in /tmp.
However, this ...