Tag Info

Hot answers tagged

46

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 ...


30

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 ...


30

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


21

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


19

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 ...


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 ...


13

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 ...


12

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 ...


11

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 ...


11

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 ...


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 ...


9

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 ...


9

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 ...


8

I'd rather have this a comment, but for some reason I can only post answers. Have a look at LaunchControl: http://www.soma-zone.com/LaunchControl/. While it does not offer a menu item to start/stop services it provides a list of all available launchd jobs, their current status and a way to start/stop them with the click of a button.


8

There are two steps to stopping GitHub Conduit: telling GitHub.app to not re-install the job with launchd and telling launchd to not run it anymore. Disable Conduit installation: defaults write com.github.GitHub GHShouldDisableConduit -bool yes Remove launchd job: launchctl remove com.github.GitHub.Conduit


7

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 ...


7

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 ...


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

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.


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

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, ...


6

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 ...


6

The way I understand it, that System folder launchd job does nothing but execute /usr/libexec/locate.updatedb itself. So simply create your own launchd job executing /usr/libexec/locate.updatedb that runs once a day. As a sidenote, here's a Super User answer which recommends using mdfind -name <filename> instead of locate so that you can use the ...


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

When you have problems to empty the trash, rm -rf ~/.Trash/* in the terminal does the job for you. Edit : You have to keep in mind that there might be multiple .Trash directories. For example on a USB stick or a external Drive, OSX will create another .Trash at the root of the drive. So you might need to use rm -rf /Volumes/DriveName/.Trash.*


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

The Program key specifies the file to execute, & the ProgramArguments key specifies the arguments which will be passed to the executing process. Strictly speaking you can pass whatever arguments you want to a process, but the convention is that the first one should be the name by which the process was invoked, so most programs ignore their first ...


6

i gave up and took the sledgehammer approach: kill it automatically, every minute. sigh. i put this in ~/Library/LaunchAgents/org.snarfed.pkill_distnoted.plist: <plist version="1.0"> <dict> <key>Label</key> <string>org.snarfed.pkill_distnoted</string> <key>ProgramArguments</key> <array> ...



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