Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
Managing startup applications is crucial for optimizing the performance and boot time of your macOS system. Startup applications are programs that automatically launch when your computer boots up, which can be convenient but may also slow down your system if too many are running. In this article, we will explore how to manage these applications on macOS, offering practical examples and commands to help you control which apps start automatically.
Examples:
Using System Preferences:
Using Terminal:
osascript
command:
osascript -e 'tell application "System Events" to make new login item with properties {path:"/Applications/YourAppName.app", hidden:false}'
osascript -e 'tell application "System Events" to delete login item "YourAppName"'
Using Launch Agents and Daemons:
/Library/LaunchAgents
, /Library/LaunchDaemons
, ~/Library/LaunchAgents
, and ~/Library/LaunchDaemons
.~/Library/LaunchAgents
with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.yourdomain.yourapp</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/YourAppName.app/Contents/MacOS/YourAppExecutable</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
.plist
extension and load it using:
launchctl load ~/Library/LaunchAgents/com.yourdomain.yourapp.plist