How can I create a Desktop shortcut that launch a shell script for Mac ?


1 comment

  • Avatar

    In this case, the best approach is to create your own .app bundle (i.e. directory with Contents/Info.plist and all other required resources). You can put the script to run in the Info.plist file - such as:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">
    <plist version="1.0">
        <string>Sample script</string>
        <string>Sample script</string>
        <string>Sample Script</string>

    Then you need to create your script as Contents/MacOS/ Similarly, icons should go to Contents/Resources.

    You can find more information in Bundle Programming Guide from Apple.

Please sign in to leave a comment.