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

learn more… | top users | synonyms (2)

3
votes
2answers
123 views

Run action when device is detached

I'm using a launchd agent to run a shell script whenever I connect my thunderbolt dock. I've been able to use IOKit notifications to detect when the dock is being attached, but I also want to run a ...
3
votes
1answer
297 views

Uninstalling Genieo broke my system

Update below, the rest is more or less background information. After discovering a Genieo install, I vaguely recalled it being, well, not trustworthy. After a quick search I knew I wanted to ...
3
votes
2answers
381 views

Add Static ARP Entry at Boot

I'm new to Mac OS X. On Linux I'd: append to /etc/rc.local arp -i eth0 -s 192.168.1.1 00:00:00:00:00:00 I've figured out how to do it in Terminal: sudo arp -s 192.168.1.1 00:00:00:00:00:00 But ...
3
votes
4answers
2k views

no such process error with launchctl start. Mac OSX 10.9

The goal is to set machine's network name with the ipaddress of this machine. I have created a plist file and put it into /Library/Launchagents/. For debugging reason I used the command "launctl ...
3
votes
2answers
5k views

How to find out what launch agent or daemon is starting a process

After installing Autodesk Smoke, I have two httpd processes running all the time, and I'd like to stop them. When I use sudo killall httpd, they stop and are restarted right away. Activity Monitor ...
3
votes
0answers
138 views

launchd StartCalendarInterval not working reliably

I have several tasks that I run from launchd using StartCalendar interval. Under Yosemite these do not necessarily run. (Under Mavericks and earlier they did run) How do I see what launchd is doing ...
3
votes
1answer
213 views

What is causing launchd to burn my CPU?

I'm running Yosemite, a clean install. launchd continuously runs at 100% CPU. Since the Yosemite upgrade I can't change the log level with 'sudo launchctl log level debug' Checking top or Activity ...
3
votes
1answer
301 views

Opening an OS X disk image with a launchd agent while the display is sleeping

I created a launchd agent which opens a non-password-protected sparse disk image (and mounts its solitary volume) daily at 2:45AM in preparation for backup software to write to the volume. The launchd ...
2
votes
2answers
2k views

Getting launchd to read program arguments correctly

I have a launchd script where the command I'm trying to run is erroring (apparently that's not a word, it is now), complaining of improper usage. The specific error I'm getting is the command's usage ...
2
votes
2answers
403 views

Huge number of anonymous.xpcd?

When I list out launchctl, I'm seeing nearly a hundred instances of iterations of: Command: sudo launchctl list | grep --invert-match com.apple yields: 1 - 0x7fb4b0f38e50.anonymous.launchd 711 - ...
2
votes
2answers
1k views

How to run a nightly backup job on Snow Leopard Server via launchd

I have been trying to configure a nightly backup job on my Mac Mini server, and after a lot of Googling and digging and man-page'ing, I figured out that launchd seemed to be the correct too, and tried ...
2
votes
2answers
500 views

How do you set the maxopenfiles limit in Yosemite?

How do you set a soft limit for maxopenfiles in Yosemite? I installed Yosemite last night, and now it's ignoring my settings in my /etc/launchd.conf file: $ cat /etc/launchd.conf limit maxfiles ...
2
votes
2answers
183 views

How to reset OS X volume after sleep using launchd?

I'm been trying to write a plist file on which when I return from sleep mode, I always want to make my Mac volume to the minimum amount. However, it looks like the following plist doesn't work, with ...
2
votes
1answer
2k views

Submitting job to launchd gives error “no plist returned”, “nothing found to load”

I'm writing my first launchd plist. When I try to load it with the following command: $ launchctl load com.Test01.plist launchctl: no plist was returned for: com.Test01.plist nothing found to load ...
2
votes
2answers
1k views

Run plist command every 5 seconds

I have the following plist file in my User/Library/LaunchAgents folder. It presses the "g" key every 60 seconds. My question is, how can I change this to press the "g" key every 5 seconds? ...
2
votes
2answers
2k views

Is there a way to load a LaunchAgent as another user?

From a script run as root I copy a LaunchAgent .plist to /Users/xyz/Library/LaunchAgents. If I load that via launchctl logged in as user xyz it works without problems. If I try to load it from the ...
2
votes
1answer
1k views

Launchctl difference between load and start, unload and stop

I was reading through the launchctl man page and have a few questions about its functioning: What is the difference between load and start, unload and stop? Where do I find the job label for a ...
2
votes
1answer
3k views

Yosemite com.apple.xpc.launchd error every 10 seconds

Every 10 seconds i get this error in my console: 20/10/14 19:35:56,840 com.apple.xpc.launchd[1]: (com.viber.osx[9850]) Could not find and/or execute program specified by service: 45: Operation not ...
2
votes
1answer
725 views

Why is my launchd job running at boot even with RunAtLoad key set to false?

I have a launchd plist file that I use to run a program at a selected time every day. It works, but it also runs the program whenever I boot the computer or unload and reload the job using the GUI ...
2
votes
1answer
255 views

Launchd script's output not being logged to system.log

Sample script: #!/bin/bash echo "Hello?" ... (other things) When run via launchd, it definitely runs (the other things are being done) but nothing shows up in system.log. I'm running OS 10.9. I ...
2
votes
2answers
375 views

Turned off everything in folder /LaunchDeamons with launchctrl; can’t boot now—how to recover?

In an effort to shut down the httpd server, I was going to execute this command: sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist Instead this was executed: sudo ...
2
votes
1answer
25 views

Is /etc/resolv.conf changed every time my DHCP lease changes?

I'd like to fire an event via launchd whenever my DHCP lease changes the IP on my WiFi interface. My question is similar to what's being asked in this question, which makes me thing I can watch ...
2
votes
1answer
124 views

Show running launchctl

When I run sudo launchctl bslist ... it shows all the running /System daemons, but I have some running from /Library/LaunchDaemons and it is not showing those. How can I show them?
2
votes
2answers
196 views

Is there a way to make launchd stop a service on sleep and start it up again on wake?

I have several pieces of server software installed on my MacBook Pro for work using Homebrew. There is one service in particular, that likes to peg the CPU after the OS wakes up from sleep until I ...
2
votes
1answer
289 views

How can root launch a regular Mac application from a cron job in /etc/crontab?

I want the cronjob to do some things as the superuser, and depending on the result, launch an app as me, the logged-in user. I've tried a bunch of things but nothing I think should work does. ...
2
votes
1answer
434 views

10.7 Launchd + rvm

This question fits somewhere between server fault, stackoverflow and askdifferent. I am installing some web apps on my Lion server using webappctl, which hooks into apaches vhost configs to setup up ...
2
votes
1answer
735 views

Lingon open source version for editing launchd on Leopard (10.5)?

I'm looking for a free GUI app to help run programs on a schedule. It seems that launchd is the underlying tool to use, and in the past Lingon has been recommended as a good GUI interface to launchd. ...
2
votes
1answer
59 views

speed up launchctl execution

I've set up a bunch of scripts that need to happen when I connect my thunderbolt dock at home (disable wifi, enable bluetooth, ...). To detect the thunderbolt dock I make use of the following ...
2
votes
1answer
32 views

What is the location of this Application's file?

This application shows in Finder at path (with target): Macintosh HD/Applications/Trans_Helper.app/Contents/MacOS/applet and I have not been able to successfully start it with launchd, using ...
2
votes
1answer
85 views

Running script through launchd with no annoying prompts

I have an applescript that checks my macbook battery and forces hibernation when it reaches a certain level, after displaying a 60 sec countdown. I've successfully set it up to run in the background ...
2
votes
0answers
59 views

How to switch from Spotlight to Alfred via Terminal?

I installed Alfred through homebrew-cask. I want to disable Spotlight and let Alfred be opened with Cmd+S. The first Terminal-based solution I tried was unloading Spotlight with sudo launchctl unload ...
2
votes
0answers
104 views

How daylight saving changes are handled in launchd to make sure it execute the the jobs as scheduled through plist?

Since August 2013, I am using Mac Mini with OS X version 10.8.2 as my web server (MAMP stack). I have a few launchd scheduled jobs scheduled through plist. Everything was working fine until Nov 3, ...
2
votes
1answer
639 views

Can't connect to rpcbind on localhost

Since upgrading to OS X 10.9 Mavericks, I can't connect to the rpcbind daemon anymore. launchctl tells me that rpcbind is loaded but not running: $ sudo launchctl list | grep rpcbind - 0 ...
2
votes
1answer
217 views

launchd keeps restarting my binary in /Library/PrivilegedHelperTools

I am looking to install a privileged helper tool using SMJobBless. My plist only contains the MachServices key and RunAtLoad key. The RunAtLoad is set to true as I want to be launched automatically ...
2
votes
0answers
34 views

How can I shut down an unlisted php-fpm?

I have two installations of php on my machine. One came with apache and is a 5.3 version, and I'm trying to use a 5.4 version with nginx. I'd like to work on project using nginx, but I can't figure ...
2
votes
1answer
2k views

Plist in /System/Library/LaunchAgents not loading on reboot [closed]

I have created the plist and placed it in /System/Library/LaunchAgents/. However, when I reboot my Mac it does not load like it is expected to. I am able to load it from the Terminal with launchctl ...
2
votes
2answers
143 views

Running Growl without a user logged into a graphical session?

I currently have an OS X server (running 10.8.2) that has irssi installed, and is set up to send Growl notifications to my laptop when I am mentioned or have received a private message on IRC. ...
2
votes
1answer
313 views

How do I increase “ulimit -u” (max user processes)?

I can change all of the usual ulimits via (for instance) ulimit -n 8192 and launchctl limit maxfiles 8192 8192. Somehow, this doesn't seem to work for -u, the maximum number of user processes: ~$ ...
2
votes
2answers
921 views

How can I write to Notification Center from a launchd command?

I've got a plist set to run at a set interval, and have put it in /Library/LaunchDaemons like so: /Library/LaunchDaemons $ ll macports_update_notifier.plist lrwxr-xr-x 1 root wheel 55B 5 Sep ...
2
votes
4answers
1k views

Editing System/Library files with Property List Editor (PLE)

I want to update the schedule in /System/Library/LaunchDaemons/com.apple.locate.plist. I have unlocked the file in Finder but the Property List Editor is giving me: The file ...
2
votes
0answers
245 views

Filter launchctl standard err/out to add timestamp to log messages

I have a Launch Daemon running, happily logging to a couple of files specified using the Standard(Error|Out)Path entries in the property list file. Now, the problem is that the particular program ...
2
votes
0answers
398 views

Launch agents not lauching at system startup

I have several plist files in the folder ~/Library/LaunchAgents. They all have the same permissions but two of them (dotjs and pow) are not launching at login, even if they have the key RunAtLoad set ...
1
vote
2answers
654 views

Why Does a Shell Script Trapping SIGTERM Work When Run Manually, But Not When Run via launchd?

Okay, quite simply I have a shell script that needs to wait for something to happen, but it has a lock-file and some child-processes that I need to ensure are tidied up if the script is interrupted. ...
1
vote
1answer
3k views

Disable Screen sharing via the command line in mountain lion

I want to be able to enable and disable screen sharing from the command line rather than through System Preferences. This is on 10.8.3 To enable screen sharing, I find I only need to change a ...
1
vote
2answers
354 views

Shell or Applescript to delay shutdown?

We have a workstation that gets used sporadically, and I'm trying to setup a script that backs it up during shutdown. I created a LogoutHook in com.apple.loginwindow to a 1-line bash script, that ...
1
vote
1answer
1k views

What's the difference between launchd and folder actions?

Could someone please briefly explain to me the difference between launchd and folder actions? Do folder actions use launchd? Is one more efficient than the other? Is one more powerful than the ...
1
vote
2answers
212 views

How can I remove remnant processes from deleted preference panes?

I discovered in Activity Monitor that I have several leftover processes running in the background that shouldn't be there anymore. I deleted these preference panes long ago with an application that ...
1
vote
1answer
1k views

prevent launchctl from starting a anonymous process

I have installed dnsmasq and now I want to be able to start it with launchctl. The problem is that every time I start the app launchctl starts an anonyous process instead of using the specified label. ...
1
vote
1answer
3k views

Need to know what's the contents of /var/db/launchd.db/com.apple.launchd/overrides.plist from Mac OS X Mountain Lion?

I accidentally issued the following command: # launchctl load -w /System/Library/LaunchDaemons/ I wish to see outputs of mac os x mountain lion launchd% list command. See below on pastie the current ...
1
vote
1answer
2k views

launchtl: any way to disable a daemon after removing the plist file?

I was trying to permanently disable a 3rd party daemon, so I deleted its plist file from /Library/LaunchDaemons-- and then I realized that I hadn't done a launchctl unload on it first; trying after ...