0
我有一個命令行應用程序,需要在用戶登錄時運行。我已將XML文件添加到用戶的啓動代理程序目錄。應用程序運行,但問題是它運行時會打開終端。我希望它能夠在用戶不知道的情況下在後臺運行。這是我的plist:在後臺使用launchchagents運行命令行應用程序mac os x
<?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>LaunchOnlyOnce</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/open</string>
<string>-n</string>
<string>/Applications/Host</string>
</array>
<key>KeepAlive</key>
<false/>
<key>Label</key>
<string>com.test.httphost</string>
<key>RunAtLoad</key>
<true/>
</dict>
我怎樣才能做到這一點?