startup_items 

Send to Kindle
home » snippets » os_x » startup_items



Paths

Path Description
/Library/StartupItems Applications that launch on User Login.


~/Library/LaunchAgents Per-user agents by the user.
/Library/LaunchAgents Per-user agents by the administrator.
/System/Library/LaunchAgents Per-user agents by OS X.


/Library/LaunchDaemons System wide daemons by the administrator.
/System/Library/LaunchDaemons system wide daemons by OS X.

Login and Logout Hooks

Note:  A hook is a script that runs as root and are enabled in /var/root/Library/Preferences/com.apple.loginwindow.

# Two reads.
{
  defaults read com.apple.loginwindow LoginHook
  defaults read com.apple.loginwindow LogoutHook
}

# or in one shot, (ref: http://superuser.com/a/10995)
/usr/libexec/PlistBuddy -c Print /var/root/Library/Preferences/com.apple.loginwindow.plist | grep 'Hook'
/usr/libexec/PlistBuddy -c Print /Library/Preferences/com.apple.loginwindow.plist | grep 'Hook'
# Note that /var/root it the home directory for the root user.

Snippets

Uninstalling the JungleDisk backgroun service.

Ref: http://support.jungledisk.com/entries/19066-Uninstalling-Jungle-Disk-from-Mac-OSX

sudo launchctl list | grep -i jungle
#   90347   -   com.jungledisk.service

# Remove the launch item.
sudo launchctl unload /Library/LaunchDaemons/com.jungledisk.service.plist
sudo rm /Library/LaunchDaemons/com.jungledisk.service.plist

# Also remove the code.  This path was in the .plist we just
# deleted.
sudo rm -rf '/Library/Application Support/Jungle Disk Desktop/'

# Now delete /Applications/JungleDiskMonitor.app
sudo rm -rf /Applications/JungleDiskMonitor.app