Testing this under macOS Sierra 10.12.6, I did not find it necessary to use the sudo
command to run CumulusMX.exe
using mono
.
At a minimum, the following example AppleScript code can be used in Script Editor to create an AppleScript application that you can add to your Login Items.
tell application "Terminal"
do script "cd $HOME/Desktop/CumulusMX; /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono CumulusMX.exe"
end tell
To use the example AppleScript code, copy and paste the code into a new document in Script Editor and then save it as an application, e.g.: Cumulus MX
Then add Cumulus MX to: System Preferences > Users & Groups > $USER > Login Items
I’d like to mention that if I was doing this on my system the CumulusMX folder would not be on my Desktop, as IMO that’s not an appropriate place to put it. Also, in testing the example AppleScript code, I did not find it necessary to use the sudo
command to run mono
, however if for some reason you need to do that, then additional steps would need to be taken but not recommended to automate.
Note: The example AppleScript code is just that and does not include any error handling as may be appropriate/needed/wanted, the onus is upon the user to add any appropriate error handling for any example code presented.