
Os x boot sequence : what is launched at startup of your Mac can be easily discovered :
“System Preferences” -> “Users & Groups” -> “Login Items”
#1 MAC Boot sequence
busycrack$ ps aux | grep launchd
root 1 0.0 0.1…0:07.95 /sbin/launchd
~/Library/LaunchAgents | Per-user agents provided by the user |
/Library/LaunchAgents | Per-user agents provided by the administrator |
/Library/LaunchDaemons | System-wide daemons provided by the administrator |
/System/Library/LaunchAgents | Per-user agents provided by Mac OS X |
/System/Library/LaunchDaemons | System wide daemons provided by MAC OS X |
For example in my home directory I have:
busycrack$ ls -ltratotal 24-rw-r–r–@ 1 busycrack staff 806 Jul 11 20:59 com.google.keystone.agent.plist-rw-r–r– 1 busycrack staff 697 Jul 20 22:25 com.*****.XXXXX.YYYYYYY-1.0.plistdrwx——@ 55 busycrack staff 1870 Jul 28 18:06 ..-rw-r–r– 1 busycrack staff 606 Jul 28 18:40 de.metaquark.appfresh.plist
#a) list all with command “lauchctl list”
busycrack$ launchctl list…- 0 de.metaquark.appfresh581 – [0x0-0x4b04b].de.metaquark.appfresh- 0 com.apple.metadata.mdwrite…
Where :
PID | Last Exit Status | Job Label |
581 | - | [0x0-0x4b04b].de.metaquark.appfres |
- | 0 | de.metaquark.appfresh |
#b) get details : ”lauchctl list de.metaquark.appfresh”
busycrack$ launchctl list de.metaquark.appfresh{“Label” = “de.metaquark.appfresh”;“LimitLoadToSessionType” = “Aqua”;“OnDemand” = true;“LastExitStatus” = 0;“TimeOut” = 30;“ProgramArguments” = (“/Applications/AppFresh.app/Contents/Resources/AppFreshDaemon”;“/Applications/AppFresh.app”;);};
#c) list all which is not by apple : “launchctl list | grep -v com.apple”
busycrack$ launchctl list | grep -v com.applePID Status Label216 – com.MadCatz.SmartTechnology- 97 com.adobe.CS5ServiceManager- 0 com.google.keystone.user.agent…Note : try also “sudo launchctl bslist | grep -v apple”
#d) remove : “launchctl remove de.metaquark.appfresh”
#e) disable : “launchctl unload -w ~/Library/LaunchAgents/…”
How disable Deamon/Agent at startup?
launchctl unload -w ~/Library/LaunchAgents/com.google.keystone.agent.plist
less ~/Library/LaunchAgents/com.google.keystone.agent.plist<!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
<plist version=”1.0″>
<dict>
<key>Disabled</key> <====!!!
<true/>
<key>Label</key>
…
…
-File overrides.plist is present in :1) /private/var/db/launchd.db/com.apple.launchd/overrides.plist
or in directory :
2) /private/var/db/launchd.db/com.apple.launchd.peruser.501/overrides.plist-
busycrack$ iduid=501(busycrack) gid=20(staff) groups=20(staff)…
1. launchctl load -w ~/Library/LaunchAgents/com.google.keystone.agent.plistless /private/var/db/launchd.db/com.apple.launchd.peruser.501/overrides.plist…<key>com.google.keystone.user.agent</key><dict><key>Disabled</key><false/></dict>—————————2. launchctl unload -w ~/Library/LaunchAgents/com.google.keystone.agent.plistless /private/var/db/launchd.db/com.apple.launchd.peruser.501/overrides.plist…<key>com.google.keystone.user.agent</key><dict><key>Disabled</key><true/></dict>
- man launchd
- man launchctl
#2 Bonus
2.1) try command : sudo launchctl bstree -j
Customizing Login and Logout :
2.2) you can check present of login script with command :
“defaults read com.apple.loginwindow LoginHook”
Script (if present) which is attached to user login… more details : http://support.apple.com/kb/HT2420
2.3) logout script : defaults read com.apple.loginwindow LogoutHook
Script (if present) which is attached to user logout
#3 App GUI for lauchdctl
lingon : http://sourceforge.net/projects/lingon/files/latest/download
Incoming search terms:
The post MAC OSX BOOT sequence ( launchd ) appeared first on Busylog.net.