launchctl has a "Status" column in the launchctl list output. The manpage or any of the related launchd manpages do not mention this column or what it means.
I have a machine on which I do not want finder to run, so initially I made it unexecutable:
sudo chmod -R a-x /System/Library/CoreServices/Finder.app
But then realised that launchd was still trying to launch finder multiple times every second, resulting in colossal log files consisiting of millions of lines of:
com.apple.launchd.peruser.502[109] (com.apple.Finder[93799]) <Error>: posix_spawn("/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder", ...): Permission denied
com.apple.launchd.peruser.502[109] (com.apple.Finder[93799]) <Warning>: Exited with exit code: 1
So I edited /System/Library/LaunchAgents/com.apple.Finder.plist
so that it would not launch anymore. The problem I have now is forcing launchd to reload the plist, and therefore stop trying to launch finder. However, I cannot restart the machine.
I have tried using launchctl to both remove and unload the process but that doesn't appear to work:
$ sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.Finder.plist
launchctl: Error unloading: com.apple.Finder
$ sudo launchctl remove com.apple.Finder
launchctl remove error: No such process
Is there anyway I can stop launchd continuously trying to load finder without restarting the machine?
On our Mac OS X (10.6) Server we have setup several backup scripts that are controlled by launchd
and launched at specific times. For this we have defined StartCalendarInterval
and this all works very well.
Now it happens that I would like to start one of these jobs out of schedule, but this does not start the job (but also does not give an error/warning):
sudo launchctl start org.job-label
The manpage of launchtl states that start
is intended to test on-demand jobs, no word of scheduled jobs. Is there a way to kickstart scheduled jobs?
Edit after getting the response: Yes, manually starting scheduled jobs also works via the launchctl start
command.
I'm running an OS X 10.5.8 server. When my users ssh into it, it can take up to about 10 seconds before they see a prompt.
I've turned on debug for ssh and see it's pausing at the "Entering interactive session", looking at the server at this point, the "launchctl" process is running for the user that just logged in.
So, can I track this down further as to why launchctl is taking about 10 seconds to start up before the ssh prompt comes back? I'm assuming it's trying to start up per-user launch daemons and agents?
Is it a known problem that launchctl is so slow? (This is especially irritating because we use the "git" scm tool over ssh!) Is there anything I can do to speed it up?
Thanks for any help or advice.
Cheers, Steve