Tag Info

Hot answers tagged

37

If a plist is owned by root and writable by a user other than root, that's a security issue. You can change the owner to root with sudo chown root <filename>, and change the permissions with sudo chmod 644 <filename> (4 for read access, 2 for write access, 1 for execute access, added up. The first number is for the owner, the second for the ...


21

I'm assuming the paths to the python script and its parameters are valid, otherwise you'd most likely be seeing errors in the Console instead. The last time I saw that error was because there were spurious characters in the plist, e.g. extra spaces, causing syntax errors and therefore making it fail to load. If you run plutil -lint on your plist, this will ...


18

Appplescript & iCal Open Applescript and enter the following code: tell application "Finder" delete folder "folder" of home end tell Replacing folder with the folder you want to delete, and save the file. If the folder you want to delete is outside home directory, (for example the folder /Users) then replace the delete line with: delete folder ...


16

With the release of Mac OS 10.4, launchd was chosen to supersede cron in Mac OS. Here's a cached version of the launchd page from the Apple Developer Connection in 2005. It explains why cron was deprecated, as well as the benefits of launchd from Apple's perspective. The summary: launchd was created to not just replace cron but also init, xinetd for better ...


14

I've seen this too. Emacs 24.3.1, Mavericks 10.9. I've found that the distnoted process calms down within seconds after I quit out of Emacs. I've filed an Emacs bug here: http://permalink.gmane.org/gmane.emacs.bugs/80836


13

Okay, I found a solution... Chris Johnsen has a good writeup of what causes this problem on github. His tools work, but a better solution, if you have homebrew installed to: brew install reattach-to-user-namespace Then in your ~/.tmux.conf add these lines: set-option -g default-command "reattach-to-user-namespace -l zsh" # or bash bind C-c run "tmux ...


10

From the launchctl(1) manpage’s description of the load subcommand: Note that per-user configuration files (LaunchAgents) must be owned by the user loading them. All system-wide daemons (LaunchDaemons) must be owned by root. Configuration files must not be group- or world-writable. These restrictions are in ...


10

launchd runs Daemons (/Library/LaunchDaemons or /System/Library/LaunchDaemons) as root, and will run them regardless of whether users are logged in or not. Launch Agents (/Library/LaunchAgents/ or ~/Library/LaunchAgents/) are run when a user is logged in as that user. You can not use setuid to change the user running the script on daemons. The /System ...


10

I know I'm late to the party but this is a memory leak specific to Cocoa emacs on Mavericks that is fixed in the trunk. For now there is a patch you can use to build emacs 24.3 with just the fix. https://gist.github.com/anonymous/8553178


9

The immediate problem is that your .plist file isn't correctly formatted -- the contents of <string>...</string> should be encoded with HTML entities, i.e. & needs to be encoded as &amp; (note: you can check the format of .plist files with plutil -lint filename.plist). But there are some other changes that need to be made... Starting ...


9

The wikipedia article on launchd has a very good summary, extended discussions as well as some great videos and external links for a deeper dive into this decision by Apple. In a nutshell, launchd replaces 7 major tasks and a boatload of scripts (inetd, init and rc and associated shell script structures, crond, atd, watchdogd, SystemStarter) with one much ...


8

EnableGlobbing enables tilde and wildcard expansion for ProgramArguments: <key>EnableGlobbing</key> <true/> <key>ProgramArguments</key> <array> <string>say</string> <string>~/*</string> </array> It doesn't affect Program or WatchPaths, but tilde expansion works in WatchPaths by ...


7

You can boot into single user mode by holding Command + s at startup. Single user mode starts you directly at the console, bypassing core Mac OS X startup processes. You should be able to remove or alter the offending file from there.


7

If you want to use a software, you can try Lingon. It allows you to manage (create, edit, delete) all the launchd items on your system. Otherwise, if you want to go by hand, look inside the following folders : /Library/LaunchAgents /Library/LaunchDaemons ~/Library/LaunchAgents


7

For anyone who ends up on this page, I realized I should post the answer: Using launchd instead of cron does indeed fix the authorization problem. Your user launchd jobs (which run only when you are logged in) correctly use the SSH agent information that was unlocked via your keychain as part of login (as part of standard OS X key management, no other ...


6

You could write a launchd script to do it. Launchd can watch for applications and restart them if they disappear. I might have one somewhere if you are interested. Updated with an example... See mankoff's example. Here's mine, it's slightly different but works the same... <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC ...


6

Launchd will run your jobs next time the mac wakes from sleep. So if you shut down your mac, this won't work. You will need to put your mac to sleep to get your daily script to run when the mac wakes if the last time it should have run was during the sleep duration. man launchd.plist: If the system is asleep, the job will be started the next time ...


6

Launchd and Folder Actions are two vastly different concepts. Folder Actions Folder Actions allow you to attach actions in the form of Apple Scripts folders which get triggered if the content of the folder changes. Typical use cases are e.g. a folder to auto-upload photos to a website removal of file attributes (e.g. the "downloaded" attribute) ...


6

To start screensharing: sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist To stop: sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.screensharing.plist The -w flag modifies the Disabled key as appropriate. It's best to let launchctl handle this, as the location where the config files are stored has ...


6

Summary from the OP: this was a great tool for debugging. it originally pointed me to Spotlight reindexing the filesystem, but I narrowed down the things it's allowed to index, and I still saw the problem. I ended up setting up a cron job to kill distnoted regularly. See answer farther down. You can debug distnoted by creating the file ...


5

That isn't actually launchctl creating a new process; it's most likely dnsmasq itself. If it fork()s into the background, launchd can't tell; then when it talks to launchd, launchd creates an anonymous entry for it. Make sure dnsmasq doesn't background itself. (The - listed for the regular launchctl list output indicates that the original dnsmasq process ...


5

The manual method (Lingon in Studer's question is a great GUI for this) is to unload the job from launchd: Run sudo launchctl stop com.jungledisk.workgroupservice to tell launchd to stop running the job but it's important to note the job will just come back the next time you restart. You can then try and track down the file in /Library/LaunchAgents, ...


5

The launchd GUI LaunchControl will give you a list of services along with their respective status. You can see if a job has been disabled by looking at the check box next to the job name. A colored check box indicates that the Disabled key has been overridden: a red checkbox stands for a permanently disabled job, a green one for a permanently enabled job.


5

If you want to stop the item for this boot simply issue an unload command to launchd via launchctl. For a permanent fix add a disabled key into the plist with value true or delete/move the file to a folder where launchd will not scan it automatically. launchctl unload /System/Library/LaunchAgents/com.apple.AppStoreUpdateAgent.plist The man page for ...


5

You can disable the individual launchd job tickets using the launchctl tool: sudo launchctl unload -w /Library/LaunchAgents/com.adobe.AAM.Updater-1.0.plist This will immediately disable the job and the -w flag will stop the job from reloading next time you restart. Given your dislike of these features, please provide feedback to Adobe, Google, and ...


4

Try the following (one-line command, not two as diplayed !) : sudo chown -R couchdb:couchdb /opt/local/var/lib/couchdb/ /opt/local/var/log/couchdb/ /opt/local/etc/couchdb/ The reboot. If it doesn't work, what version of MacPorts and CouchDB do you have ?


4

The correct answer is sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mysql5.plist And you start it with sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist Thanks to kh13org for the pointer.


4

Several things come to mind: Did you wait overnight for it to run? launchctl load won't make it run out of sequence -- if you want to make it run at some time other than 3:15 am, use sudo launchctl start dk.revealit.NightlyRSyncBackup after it's loaded. Does the run-rsync script fire off any background processes, or does it do everything inline? 'Cause ...


4

Adding the following code to your bash shell script will fix the problem: declare -x SSH_AUTH_SOCK=$( find /tmp/launch-*/Listeners -user your_user -type s | head -1 ) Replace "your_user" with your own user name. This code sets the correct value for SSH_AUTH_SOCK that informs "ssh" or "scp" about how to communicate with "ssh-agent" when the shell script ...



Only top voted, non community-wiki answers of a minimum length are eligible