Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [launchctl]

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

0
votes
0answers
17 views

launchctl unload say: Could not find specified service

I'm trying to make a plist file in order to start nginx on boot. When starting nginx with launchctl it starts the service. But it cannot unload it, and print "Could not find specified service". $ ps ...
2
votes
2answers
75 views

How to schedule a run of “docker-compose,” on MacOS, using launchd

I'm building some software with docker-compose, for which I would like to run on a schedule. So I need to schedule a run of docker-compose up, on MacOS (High Sierra, 10.13.3), using launchd. This is ...
1
vote
1answer
133 views

Remove build in Apache httpd on macOS (OSX)

I have a Mac Mini running a private server from home. It is running macos High Sierra (osx) and and previous used "Apple Server" to manage my websites (using the build in apache httpd). But since ...
0
votes
1answer
127 views

OS X: Agent/Daemon shows up in launchctl list, but cannot find its .plist

I've been having this issue for quite some time now. It doesn't really hurt my workflow, but every time I want to look for something in the console, it gets in the way, since there's the following ...
4
votes
0answers
1k views

Increase number of open files in mac high sierra

On a mac high sierra 10.13.3 I have 256 open files. I want to raise it and I open a terminal and enter sudo launchctl limit maxfiles 1000000 1000000 This doesnt change anything when I enter ulimit ...
0
votes
1answer
93 views

launchctl print system printed “bootcache hack” and “exec hack” results

I used the following command to list launchctl facilities, and at the very end of the print out were some interesting results: command used: launchctl print system end of results: properties = ...
0
votes
1answer
68 views

Is it possible to use com.apple.CalendarAgent.plist to open a third-party Calendar app?

From what I understand, MacHD/System/Library/LaunchAgents/com.apple.CalendarAgent.plist handles calendar requests and opens them in the default MacOS calendar (calendar.app). I am wondering if it's ...
1
vote
1answer
164 views

How can I stop a launchd service?

I have a launchd service with label homebrew.mxcl.postgresql: $ launchctl list homebrew.mxcl.postgresql { "LimitLoadToSessionType" = "Aqua"; "StandardErrorPath" = "/usr/local/var/log/postgres....
1
vote
0answers
99 views

Using Launchd for an Applescript Application

I created an Applescript Application (called Print Release) that runs without issue (code below): do shell script "rm -R /Users/<account>/release.zip; rm -R /Users/<account>/release; curl ...
0
votes
1answer
509 views

Unable to kill process, launchctl unload/remove failed

I have a process running in the background from a trial I once had installed (Bitdefender Antivirus). I tried uninstalling it but there's some parts that I did not manage to get off my computer. Here'...
1
vote
0answers
57 views

Tracking launchtl locate database creation

I'm running the locate command to look for a file on MacOS and I get a warning that locate.database needs to be created with a certain command. I noticed it takes quite a while to build the database ...
1
vote
1answer
621 views

I can't seem to resolve java.io.FileNotFoundException (Too many open files in system)

Disclaimer. First I am NOT a SU. I'm a mid level computer user with a bit of experience. I can write some basic code, have used computers for 20+ years. MSDOS, to Windows through the years now I'm ...
1
vote
0answers
43 views

LaunchAgents: Launch App as root

I'm doing a kiosk app for osx. there was a previous version of this app working on OSX 10.8, but the computers got updated and now the app isn't working properly. i need to avoid user can kill the ...
0
votes
1answer
59 views

Redis will not start via bitbar / brew services start

Trying to get redis managed via bitbar's brew services plugin, I cannot; it silently fails, and running brew services start redis also silently fails. Equally, brew services list shows it as started, ...
1
vote
0answers
82 views

Restart a daemon without root in OSX

On OSX 10.10 I created a plist file in /Library/LaunchDaemons/ to start at launch an OpenVPN connection. However I encountered DNS problems when going from an internet interface to another (as WiFi to ...
1
vote
1answer
816 views

launchctl starts program but does not list pid

I have been troubleshooting this issue for a while now. Consulted the web, several stackexchange platforms and discussion forums. Here is my problem description: Usecase: I have naviserver installed ...
1
vote
1answer
957 views

MongoDB homebrew launchctl not working (OS X El Capitan)

Steps: brew update brew install mongodb ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist mongo Output: MongoDB shell ...
2
votes
1answer
2k views

unable to load script via launchctl “command not found”

I have a problem loading a script to watch a folder via fswatch in /Library/LaunchAgents The script runs fine when run from terminal, but via my plist, it gives me "Command not found" for fswatch in ...
1
vote
0answers
64 views

mysqldump via launch daemon on mac osx not working

I'm trying to create a mysqldump of a database via bash script, and automate the process by using Mac's launchd / launchctl process. I can successfully run the bash script manually to backup the db in ...
1
vote
1answer
217 views

OSX/launchctl: How do I open a specific website in a new instance of chrome in the foreground every morning?

Requirements: Specific website Every morning despite laptop being closed overnight (launchctl can handle this) Foreground - must come to my attention, even if I have multiple spaces/desktops ...
0
votes
2answers
3k views

How to kill mysql with moving pid

I have multiple mysql instances running on OSX 10.10. /usr/local/mysql/bin/mysqld stop spits out a bunch of warnings and errors, I'm not sure if they're worth sharing. Here's the first error 16164 [...
2
votes
1answer
434 views

Cannot get docker-machine to start using launchctl on OSX

I am trying to start docker-machine using a launchctl. I have install docker-machine using the docker toolbox. Here is my plist file: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist ...
0
votes
1answer
464 views

Launchctl - submit command instead of executable

I know it's possible to submit the path of a program to launchd via launchctl submit -l label [-p executable] [-o path] [-e path] -- command [args] But is it also possible to pass a command ...
7
votes
1answer
10k views

OS X: LaunchDaemon not running: Service could not initialize

I used Apple's seemingly straightforward docs to create a LaunchDaemon to run a Node.js script I wrote. Here's the plist file. It's basically exactly a copy-paste from Apple's docs, set to run every ...
2
votes
0answers
328 views

Start Appium server at system boot (MacOS)

I'm trying to setup Appium server to stat automatically after system startup. Also I'd like it to restart after a crash. Appium was installed as a npm package and it launches and works fine when I ...
3
votes
2answers
12k views

How to start a service using Mac OSX's launchctl

Why does my configuration plist file not load as a service using launchctl? I am running OSX Yosemite, and I have read this excellent tutorial on using launchctl http://nathangrigg.net/2012/07/...
1
vote
1answer
255 views

Starting Suricata with launchctl on Mac OS X

Using Mac OS X Yosemite 10.10.3. I'm trying to make Suricata start in daemon mode on boot with launchctl. Here is my /Library/LaunchDaemons/org.suricata.Suricata.plist: <?xml version="1.0" ...
0
votes
2answers
263 views

Unable to remove peruser launchd process

I am constantly getting the following messages in system log: com.apple.launchd.peruser.0 (homebrew.mxcl.memcached[PID]) Exited with code : 64 com.apple.launchd.peruser.0 (homebrew.mxcl.memcached) ...
1
vote
2answers
2k views

Killing a launchctl process: Cassandra

I used launchctl load ~/Library/LaunchAgents/homebrew.mxcl.cassandra.plist and it launches Cassandra if not started already. ps aux | grep cassandra tells me Cassandra is running and I kill the ...
0
votes
2answers
1k 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 ...
5
votes
1answer
5k 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 ...
1
vote
2answers
327 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 ...
9
votes
1answer
1k 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" "http://www....
0
votes
1answer
2k 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 /usr/local/Cellar/collectd/5.4.0/sbin/...
25
votes
7answers
54k 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 ...
0
votes
0answers
53 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
424 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 ~/Library/...
0
votes
1answer
499 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
211 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
164 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 ...
1
vote
0answers
510 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', ...
0
votes
2answers
706 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 ...
3
votes
1answer
1k 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 ...
3
votes
2answers
3k 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 permissions:...
0
votes
2answers
4k 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 ...
2
votes
1answer
3k 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 -...
2
votes
1answer
3k 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" encoding="UTF-8"...
6
votes
1answer
11k 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 ...
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 ...
15
votes
5answers
21k 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)?