I know I can use <createsymlink> to create a desktop link; but how can I use the <target> tag to link to a shell script ? If I point the <target> to a shell script, the short cut will launch a text editor and open the script for editing.

Any idea ? thanks ray

asked 21 May '12, 18:32

alpharay's gravatar image

accept rate: 0%

In this case, the best approach is to create your own .app bundle (i.e. Script.app 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" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<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/script.sh. Similarly, icons should go to Contents/Resources.

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


answered 22 May '12, 05:37

wojciechka's gravatar image

wojciechka ♦♦
accept rate: 26%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 21 May '12, 18:32

Seen: 4,591 times

Last updated: 22 May '12, 05:37