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 have an app in /usr/local/bin directory and can not drag it onto the dock and have to open Terminal everytime I want to run this program.

Is it possible to run a macported/homebrewed application from the Dock?

share|improve this question
    
Is it worth naming the exact application you want to run? You might get better answers if you're more specific. –  binarybob Apr 1 '12 at 9:45
    
Don't think so. It's a general question –  Ask Apr 1 '12 at 10:53
    
Thats fine, its just the way your question is worded it sounds like something specific. –  binarybob Apr 1 '12 at 11:26

1 Answer 1

up vote 2 down vote accepted

You should be able to do this using AppleScript, saving the script you create as an application, then dragging it to the dock.

For example, if you start the Apple Script Editor (/Applications/Utilities/Apple Script Editor.app). Then type something like the following, replacing my trivial example of /bin/date with the command you want to run

tell application "Terminal"
    do script "/bin/date"
 end tell

or

do shell script "/bin/date"

Either script should work, but the first explicitly opens the Terminal - it just depends on the application you want to run and whether it sticks around.

Then save this script as an application (use the dropdown in the save dialog to change the "File Format" to "Application").

enter image description here

You should then be able to drag the .app file you created to the Dock and run it.

share|improve this answer
    
funny syntax. that's Apple –  Ask Apr 1 '12 at 18:25

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.