MacOS 在登录时禁用应用程序的自动 运行?
MacOS disable auto-run of applications upon log in?
是否可以阻止 MacOS 应用程序在登录时自动 运行,即使在以下系统偏好设置中找不到它:Users & Groups → Login Items
?
以 Microsoft OneDrive Updater 为例禁用自动启动
1.检查您拥有的应用程序:
ls -l /Library/LaunchAgents/*.plist
输出:
-rw-r--r-- 1 root wheel 523 Feb 17 14:30 /Library/LaunchAgents/com.microsoft.OneDriveStandaloneUpdater.plist
-rw-r--r-- 1 root wheel 377 Feb 17 14:30 /Library/LaunchAgents/com.microsoft.update.agent.plist
2。打开 OneDrive 更新程序:
sudo nano /Library/LaunchAgents/com.microsoft.OneDriveStandaloneUpdater.plist
输出:
<?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.microsoft.OneDriveStandaloneUpdater</string>
<key>Program</key>
<string>/Applications/OneDrive.app/Contents/StandaloneUpdater.app/Contents/MacOS/OneDriveStandaloneUpdater</string>
<key>ProgramArguments</key>
<array/>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>86400</integer>
</dict>
</plist>
3。将 RunAtLoad
更改为 false
:
<key>RunAtLoad</key>
<true/>
<key>RunAtLoad</key>
<false/>
4.保存更改
5. ...
6.利润
*已在 Catalina 和 Big Sur 版本上查看
是否可以阻止 MacOS 应用程序在登录时自动 运行,即使在以下系统偏好设置中找不到它:Users & Groups → Login Items
?
以 Microsoft OneDrive Updater 为例禁用自动启动
1.检查您拥有的应用程序:
ls -l /Library/LaunchAgents/*.plist
输出:
-rw-r--r-- 1 root wheel 523 Feb 17 14:30 /Library/LaunchAgents/com.microsoft.OneDriveStandaloneUpdater.plist
-rw-r--r-- 1 root wheel 377 Feb 17 14:30 /Library/LaunchAgents/com.microsoft.update.agent.plist
2。打开 OneDrive 更新程序:
sudo nano /Library/LaunchAgents/com.microsoft.OneDriveStandaloneUpdater.plist
输出:
<?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.microsoft.OneDriveStandaloneUpdater</string>
<key>Program</key>
<string>/Applications/OneDrive.app/Contents/StandaloneUpdater.app/Contents/MacOS/OneDriveStandaloneUpdater</string>
<key>ProgramArguments</key>
<array/>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>86400</integer>
</dict>
</plist>
3。将 RunAtLoad
更改为 false
:
<key>RunAtLoad</key>
<true/>
<key>RunAtLoad</key>
<false/>
4.保存更改
5. ...
6.利润
*已在 Catalina 和 Big Sur 版本上查看