Questions tagged [launchd]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
9 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
2answers
37 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
0answers
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
1answer
46 views

What is morphunassetsupdaterd?

I haven't noticed this process earlier. Process: morphunassetsupdaterd [2684] Path: /usr/libexec/morphunassetsupdaterd Load Address: 0x105960000 Identifier: ...
0
votes
0answers
13 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
1answer
74 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 ...
0
votes
0answers
40 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
0answers
19 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
0answers
8 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
0answers
17 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 ...
0
votes
0answers
18 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
1answer
20 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
1answer
30 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
0answers
19 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
0answers
23 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
1answer
53 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
0answers
22 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
0answers
26 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
0answers
20 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/...
1
vote
1answer
49 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
0answers
17 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 ...
0
votes
0answers
18 views

Enabling Keyboard Media Key Events on MacOS

Environment: Fresh Install of MacOS 11.1 I wanted to disable Apple Music / iTunes from responding to keyboard media keys (previous, pause, start) so I ran the following line through launchctl: ...
0
votes
1answer
120 views

Enable/load .plist issue after Big Sur update

I've spent the last day googling this issue and can't get it figured out. Apparently, Big Sur treats load and unload as legacy and you are supposed to use enable and disable however I've tried many ...
0
votes
0answers
20 views

How to execute rc.local at boot

Found this in an old threat. But it did not work as described here. What I want to do in the end is to start my own daemon from rc.local. I am running OSX 11.5.2. So I created the file ls -l /Library/...
0
votes
0answers
47 views

plist not running properly after restart

I wrote a worker service that listens for changes in the folder using a filesystemwatcher with C#. After copying the files to a Mac, I created a script and plist file. After running the code below, ...
0
votes
0answers
28 views

How do I make a LaunchAgent load at log in (via Lock Screen Hot Corner)

What I want to do Load a LaunchAgent at log in, including logging in after locking my screen or the display goes to sleep. What my problem is My LaunchAgent loads when I log in after booting my Mac, ...
0
votes
0answers
16 views

Reverse SSH Tunnel: Connection Refused

I have a couple of Raspberry Pies at my condo to which I log in from my home iMac via reverse SSH tunnels. Generally, this works fine. However, if the Internet goes down at the condo and is ...
0
votes
0answers
16 views

apple-xsrvr-admin service loading on startup

Not sure why this service is loading on startup, I tried tracing through the port: lsof -i :port Tells me it's listening: *:dec_dlm (LISTEN) Trying to trace back the launch daemon for the service in ...
0
votes
1answer
76 views

Run Shell Scripts on a Schedule

Is there "a right" way to run shell scripts on a schedule in modern versions of MacOS? My usual go to for this has been using the cron command -- but recent changes make seem like this isn'...
2
votes
1answer
581 views

All apps crash on click/opening

Seeming randomly all applications start to crash. Sometimes after days. This includes Finder and even the Menubar. I've been trying to debug this problem, but so far with no success. Even a full ...
0
votes
0answers
14 views

launchctl dumpstate won't give full dump

launchctl dumpstate is giving me exactly 20mb of data then just exits in the middle of a service description: inherited environment = { PATH => /usr/bin:/bin:/usr/sbin:/sbin ...
1
vote
0answers
26 views

How Do I Create a Custom Guest User?

I have a mac that will be used by myself (admin) and a few other people (second account). I don't want data to persist between logins on this second account, similar to how the Guest Account works. ...
1
vote
2answers
98 views

How to dynamically add anchors on startup for apple pfctl without editing system pf.conf

There are a few answers on using pfctl on os x, but none really give a nice clean way to make an anchor and have it loaded on startup, or to allow programs to hook in and dynamically update / replace ...
0
votes
1answer
61 views

Hiding default folders via launchagent: not applying to documents

Bit of an odd one. Our organisation needs to allow some aspect of local storage access to accommodate work on large files without constantly writing to network drives. They work on these files and ...
0
votes
1answer
409 views

How to disable mDNS correctly?

I work for a company and they asked me to disabled this mDNS for all the Macs. I've tried: sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSresponder.plist Result: Unload failed: ...
1
vote
0answers
32 views

Using launchd to run script once a day when logged in

I'm in the situation where I would like to run a script only once per day when I open my MacBook. I guess I could have the script note the date it was last run, and have it reject when run on the ...
0
votes
0answers
179 views

"fs_snapshot_create: Operation not permitted" when trying to generate new system snapshot on M1 Mac

I follow the instructions in How can I edit "/System/Library/LaunchDaemons/com.apple.nfsd.plist" In Catalina? but failed in generate and tag new APFS System Snapshot. /System/Library/...
5
votes
2answers
629 views

Disabling Notification Center in macOS Big Sur 11.4

I absolutely hate the Notification Center in macOS. I had successfully turned it off permanently in an earlier version of Big Sur by executing the following commands in the Terminal, followed by a ...
0
votes
0answers
36 views

Give the Terminal.app Full Disk permission problem even it is given

macOS: v 11.2.3 Chip Apple M1 I have given the Full Disk Access to Terminal and iTerm. But when I run a Bash script to clean up the Trash directory I get "Give the Terminal.app Full Disk ...
1
vote
1answer
246 views

Alter ulimit for Terminal without changing kernel parameters

Note: I am looking for an answer for Catalina and for Big Sur. The commands below were run on Catalina. Most related questions and answers are for older versions of macOS which work a bit differently, ...
0
votes
0answers
26 views

Launchd job doesn't run at specified interval

I had a launchd job where the StartInterval is set to 10800 (seconds), however, the job actually ran at a rather short interval like 5 seconds, and I couldn't figure out why. Here's the job definition:...
0
votes
0answers
22 views

pfctl: Duplicate signature for

What would cause pfctl to output a bunch of errors regarding duplicate signatures to stderr when run as a daemon using launchd under /Library/LaunchDaemons, but not when run manually from Terminal? ...
2
votes
1answer
53 views

How can I return the logged in user from inside a pkg which is running as root?

I'm using the Packages app to create an installer which includes, among other things, a launchd job. The postinstall Bash script needs to target the logged in user as follows: launchctl bootstrap gui/$...
3
votes
2answers
327 views

ulimit -n shows different values in mac terminal and intellij terminal

I have tried increasing the max open files limit in mac by running the following command sudo launchctl limit maxfiles 524288 10485760 When I try running ulimit -n it shows 524288 But while running ...
0
votes
0answers
9 views

trigger script when a launch agent/daemon is stopped

Is there a way to trigger a script when a launch agent is stopped? Similar to ExecStopPost in linux with sysmtemd. I want to run a teardown script when a launch agent is stopped
2
votes
0answers
227 views

Restart CoreAudio... to fix Safari problems?! Why?

On my M1 Macbook Pro (2020) running Big Sur 11.3.1, I've found that I need to restart CoreAudio to solve seemingly unrelated problems. For example: Safari will stop rendering content... Safari is ...
1
vote
0answers
494 views

lsd and tccd hogging CPU, launchd getting killed, backupd crashing often

The last couple of days, my Mac (OS 10.14.6 Mojave) has had two daemon processes running hard and hot: lsd (launch service) and tccd (which apparently manages which apps have permission to access ...
0
votes
1answer
316 views

How can I make a LaunchDaemon run an app at login?

I have an internally-maintained macOS app for my macOS Catalina-based enterprise environment which: Must run as root (it accesses a privileged device API) Runs in the background without a UI (via ...
2
votes
1answer
108 views

Stop malware from being executed by launchd

I've got this program running on my computer, /var/root/Library/Application Support/.SectionChannel.dp/SectionChanneldd, which Norton has identified as the malware OSX.Malcol. However, Norton has ...
3
votes
1answer
125 views

How to figure out how a process auto started itself after login?

(I added an Update in the end.) My related questions: How to delete hidden login iterms from backgrounditems.btm? A launchd job without plist file, how does that work and how to find what job ...

1
2 3 4 5
14