Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I can't seem to figure this one out, there must be some really easy trick.

I have a bash script which sets my environment for an app and launches it with the correct parameters. How can I put this script (or any script) on the dock?

Thanks,

share|improve this question
add comment

1 Answer

Automator can be used to create an application "wrapper" around a script, so that you can launch your script like any other application (and it won't spawn a superfluous Terminal window in the process).

  1. Open Automator, and create a new application type workflow.
  2. Add a Run Shell Script action, and enter your script into the text field.
  3. If your script takes input (such as files), make sure the Pass input setting on the action is set appropriately (either arguments, if you use $1, $2, etc. or stdin). Otherwise you can ignore this setting.
  4. Save the workflow to your location of choice, then drop the resulting file in the Dock.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.