launchctl is an interface to OS X' launchd system to load or unload daemons or agents.

learn more… | top users | synonyms

15
votes
5answers
15k views

How do I start nginx on port 80 at OS X login?

I installed Nginx using homebrew and after completing the installation the following message was displayed: In the interest of allowing you to run `nginx` without `sudo`, the default port is set to ...
7
votes
5answers
6k views

Setting environment variables in OS X for GUI applications

How does one set up environment variables in Mac OS X such that they are available for GUI applications without using ~/.MacOSX/environment.plist or Login Hooks (since these are deprecated)?
6
votes
1answer
328 views

launchd seems ignore StartCalendarInterval on Yosemite

I tried to update Homebrew on time with launchd. My plist file is presented here: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" ...
4
votes
3answers
4k views

Can’t launch daemon with launchctl in Yosemite

I have a launchd daemon placed in ~/Library/LaunchAgents that worked well in Mavericks. But it won’t start in Yosemite public beta. The daemon plist is like this (my username is darksair with UID ...
4
votes
1answer
3k views

Mac os x 10.7.4 process limit

I have a 709 max user process. I want to double it, or more. First: ulimit > ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited file size ...
3
votes
1answer
4k views

launchctl: Dubious ownership on file (skipping) (Mac OS X)

I installed mysql recently and added its start command in my .bash file. But when I tried running the command, that's when I encountered this error: launchctl: Dubious ownership on file ...
3
votes
2answers
1k views

Launchctl: how can I configure a service to stop restarting automatically until next reboot?

I have several services set up in launchctl and they all start at boot and restart automatically whenever they stop for any reason. That's great so far. But sometimes I want one of the services to ...
3
votes
0answers
860 views

Cannot increase maxfiles limits on Mac 10.7

I an only set lower values for the launchctl limit maxfiles. I try launchctl limit maxfiles 2048 2048 and nothing changes: $ launchctl limit maxfiles maxfiles 500 500 $ launchctl limit ...
2
votes
2answers
298 views

Mac OS X problem starting FTP from preferences

When I try to enable the FTP service in the preferences (File Sharing->Options->Share Files and Folders Using FTP) the check box enables and then disables again. The console is giving me the message ...
2
votes
1answer
2k views

Auto Launching PHP-FPM

My plist file <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd" > <plist ...
2
votes
1answer
1k views

Automatically starting svnserve on Snow Leopard

Note: I originally asked this question on Server Fault (http://serverfault.com/questions/148052/automatically-starting-svnserve-on-snow-leopard), but I thought this may be a more appropriate place to ...
2
votes
1answer
2k views

Mac os X Error unloading plist

I'm currently using MacOSX 10.8 and I tried to install the built-in php-fpm. Moreover I want a plist file to start and stop php-fpm on demand. I found this one <?xml version="1.0" ...
2
votes
1answer
335 views

Start SSH Server without typing a password - Sudoers (NOPASSWD)

I would like to execute the below command line without typing a password sudo -s /bin/launchctl load -w /System/Library/LaunchDaemons/ssh.plist So I tried to add the below lines to my sudoers but ...
1
vote
2answers
1k views

OSX run script to mount sshfs at login with a plist file

I've read through the man pages for plist and launchd.plist, as well as posts about using plist files to run scripts at login; but I can seem to get things working. My script location and ...
1
vote
1answer
1k views

Running – or only starting – a daemon using launchd

I'm trying to set up YouTrack on OS X Lion Server and have it launch at boot using launchd. I have downloaded the YouTrack jar file which I can successfully run from the command line using java ...
1
vote
1answer
372 views

Run a script every minute between two times using launchd

I'm trying to run a script every minute (or 20 seconds) between 06:30 and 10:30 every weekday using launchd. I have the script running every minute / X seconds now, but I don't know how to limit this ...
1
vote
3answers
1k views

OSX 10.8 Corrupted User Account Using Launchctl

I used the following command: launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist in an attempt to disable notification center. I'm not sure that I got all of the ...
1
vote
1answer
2k views

Use launchctl to fire an AppleScript script periodically

I have written an AppleScript that lets me back up a particular file. The script runs fine inside AppleScript Editor: it does what it's supposed to do perfectly. So far so good. Now I'd like to run ...
1
vote
2answers
54 views

OS X: Run script at Login screen with FileVault on

How to run a script at Login screen (BEFORE user types password to log in)? I have tried launchctl and place the script under both: /Library/LaunchDaemons/ /Library/LaunchAgents/ Still the script ...
1
vote
0answers
176 views

Mac: Run screen command from launchctl

I have a Python script that I would like to run on a Mac at system start up in a detached screen session. The Python File (foo.py): import time import datetime while True: print 'hello', ...
1
vote
0answers
259 views

Why is launchd (launchctl) on Mac OS X 10.6.8 on a Mac Pro preserving launch time values across reboots?

I've created a .plist with a StartCalendarInterval key for a program that must run once a day. It works, and I'm satisfied. I've also created a python script that reads a config file and will re-run ...
1
vote
1answer
572 views

How can I periodically run a shell command using launch agents on Mac OS X?

We have a Kerberos single-sign-on system in our company. This means that I can just type kinit user@DOMAIN in the terminal, and then I can access all IT resources like file servers, internal wiki, svn ...
0
votes
2answers
781 views

How do I launch this .plist file on startup *before* I log in?

I copied the current full .plist file at the bottom of this question. Right now I have a .plist file that I loaded with launchctl -w load ~/Library/LaunchAgents/local.setgetscreenres.plist to make my ...
0
votes
1answer
115 views

Should I run postgresql all the time?

I'm wondering whether there is any speed (in the OS) or security issues with running postgresql all the time (using launchctl) for development of rails apps, whether I should launch postgres only when ...
0
votes
1answer
55 views

Xquartz stopped working on Maverics. Cannot install a valid X11 forwarding

I'm having trouble with XQuartz on Mavericks. After I went to apple genius support to change my battery (in which the genius guy forced power off when I had an X11 connection opened), I am having the ...
0
votes
1answer
181 views

How to start a plist agent running as root at boot

I have installed nginx via homebrew, by default it provides a plist which is symlinked from ~/Library/LaunchAgents and running launchctl load ~/Library/LaunchAgents/nginx.plist starts nginx as my user ...
0
votes
1answer
96 views

launchctl plist file not running

I have created a python script, I would like it to run on my mac some time after 4:30 every weekday. I followed the instructions a launchctl plist file here. But it doesn't run, I looked for solutions ...
0
votes
1answer
40 views

Is running multiple databases on login going to make my Mac really slow?

Sometime ago, I installed Postgres, and the Launch agent that causes it to run when I log in. Just now, I did the same thing for Mongo. I was just about to do it for Couch. I don't remember if I ...
0
votes
1answer
127 views

Increasing Yosemite maxfile limit for Application

I've been trying to up the maxfile limit and maxfileperproc limit on Yosemite, with no luck. I have created a sysctl.conf file in the etc folder, which has successfully increased the values when ...
0
votes
0answers
10 views

How do I keep a process running when connected to a particular network and not running at all other times, on Mac OS X?

I have a process that I need to have running whenever a certain network connection is active, but not running at all other times. Initially I thought LaunchAgents could help, if there was some useful ...
0
votes
0answers
25 views

How is a basic daemon made on OSX?

I have an OSX system that I'd love to have some daemons set up on that will automate the updating of all of my console utilities. How would I go about creating and running such daemons? I'd also like ...
0
votes
1answer
146 views

OS X: Unload process from launchctl

I need to stop collectd for a while. I can see it's running: ps axuw | grep collectd user 73543 0.0 0.0 2540860 1900 ?? S 4:15PM 0:00.26 ...
0
votes
0answers
34 views

Creating and running a launchd daemon

I'm trying to follow along w/ the tutorial located here: http://www.tuaw.com/2014/06/11/how-to-keep-homebrew-and-xquartz-updated-automatically/ I've properly set up all of the script files, but am ...
0
votes
0answers
19 views

com.user.loginscript[ ]): Exited with code: 1

Whenever we restart our server it changes our DNS and apache settings. I haven't been able to figure out why, so I wrote a quick script to restore these to safe settings on login to fix Mac OS X ...
0
votes
1answer
86 views

terminal-notifier fails silently when called from launchd

I've created a script to update my package manager and post a notification via terminal-notifier. When run manually, it works fine, but when called via launchd (local to the user, in ...
0
votes
1answer
145 views

Using ruby application in launchctl scripts

In OS X, I am trying to create a script invoked automatically by launchctl. This script will invoke ruby application (jabber-tee and terminal-notifier) installed with gem. Her is my python script. ...
0
votes
1answer
296 views

Is it possible to stop a service through launchd if the service is started manually?

I am using launchd to start mysql on boot, it is working fine. I am able to stop and start the service using 'launchctl unload' and 'launchctl load' commands. Also I am able to start the service by ...
0
votes
2answers
399 views

launchctl - use rvm instead of system Ruby in executed scripts?

I have a launchctl job I define as such: <key>ProgramArguments</key> <array> <string>/bin/sh</string> <string>-c</string> ...
0
votes
2answers
357 views

setting environment variable for launchctl

I've set up this todo.txt add-on and now I want to run todo.sh recur every morning. I've got Lingon (a Mac GUI) running the command, but I get the following error: 5/15/12 10:33:00.067 AM ...