Questions tagged [launchd]

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

Filter by
Sorted by
Tagged with
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"?> <!...
user avatar
  • 121
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 ...
user avatar
  • 101
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'...
user avatar
  • 4,464
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 ...
user avatar
  • 304
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\|...
user avatar
  • 161
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 ...
user avatar
  • 1
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 ...
user avatar
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 ...
user avatar
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/...
user avatar
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. ...
user avatar
  • 121
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 ...
user avatar
  • 1
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 ...
user avatar
  • 1,922
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 ...
user avatar
  • 783
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 := ...
user avatar
  • 331
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? ...
user avatar
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 ...
user avatar
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 ...
user avatar
  • 21
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 ...
user avatar
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 &...
user avatar
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/...
user avatar
  • 3
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 ...
user avatar
  • 103
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 ...
user avatar
  • 141
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 ...
user avatar
  • 971
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 ...
user avatar
  • 111
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 ...
user avatar
  • 1
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. ...
user avatar
  • 105
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....
user avatar
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 ...
user avatar
  • 717
-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 ...
user avatar
  • 1
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 ...
user avatar
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 ...
user avatar
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 ...
user avatar
  • 101
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: ...
user avatar
  • 133
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, ...
user avatar
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 ...
user avatar
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/$...
user avatar
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 ...
user avatar
  • 121
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 ...
user avatar
  • 5,742
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 ...
user avatar
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 ...
user avatar
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 ...
user avatar
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 ...
user avatar
  • 105
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 ...
user avatar
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 ...
user avatar
  • 151
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]: ...
user avatar
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 ...
user avatar
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 ...
user avatar
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/...
user avatar
  • 11
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 ...
user avatar
  • 194
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 ...
user avatar
  • 493

1
2 3 4 5
14