Adding a Bash Script to Mac OS X Dock

This is more painful than it should be, but if you are interested in placing a Bash script in the Mac OS X Dock, follows these steps. You can’t simply just drag a *.sh file to the Dock for some reason; however, if you rename the file to have the *.command suffix, then you can. This will open a separate terminal window.

[code language=”bash”]

mv foobar.sh foobar.command

[/code]

You will likely want to edit the icon as well, so it is more recognizable. This seems a bit finicky as well, but simply open an *.ICNS file, select all / Ctrl+a, and copy / Ctrl+C. Now, right+click on the *.command script, select “Get Info”, select the existing icon in the upper left of the resulting window, and paste / Ctrl+v. It should update.

4 Comments:

  1. I am now not positive where you’re getting your info, however great topic. I must spend a while studying much more or figuring out more. Thank you for magnificent information I was looking for this information for my mission.

  2. I reckon something really special in this web site.

  3. Thanks for sharing superb informations. Your website is so cool. I’m impressed by the details that you¦ve on this website. It reveals how nicely you understand this subject. Bookmarked this web page, will come back for extra articles. You, my pal, ROCK! I found just the information I already searched everywhere and simply could not come across. What an ideal web-site.

  4. Youu actually make itt seem soo easy with your presentation buut I fund this matter to be actually ssomething that I think I
    would nerver understand. It serems too complicate and verry broadd foor me.
    I am looking forward for yohr nexxt post, I’ll tryy to gett
    tthe hang off it!

Leave a Reply

Your email address will not be published. Required fields are marked *