I am trying to automate a part of start up script that would open a terminal window that would run commands and display a bunch of text to user upon login.
I tried to create a plist in /Library/LaunchAgent that doesn't seem to do the trick
/LaunchAgents/blah.blah.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "..........">
<plist version="1.0">
<dict>
<key>Label</key>
<string>terminal.menu</string>
<key>RunAtLoad</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</script>
<string>/Library/Scripts/Startup.sh</string>
</array>
</dict>
</plist>
and the Startup.sh looks like this
osascript -e 'tell app "Terminal"
do script "echo blah blah ; ssh blah blah"
end tell'
Based on information from here, there are a couple of edits you could make to your
.plist:The
labelvalue should match the name of your.plist, in this case"blah.blah", or you should save your.plistas"terminal.menu.plist".You've specified
ProgramArguments, but noProgram. Perhaps if you change this:to this:
So your
blah.blah.plistdefinition would now look like this: