Have you ever wanted a shortcut on your desktop to run bash scripts?  Here is how.

I use a bash script to open chrome without the url bar. The script goes as such.

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --app="http://www.junesiphone.com/youtube"

I use this for my youtube page as it allows me to have a video fullscreen without the url bar or bookmark bar.  I can also adjust the window size.   A good and easy way to open this when I want, is to create an app to run the script.

How to create the app

  • To do this we will use Automator.  This is built into Mac OS and allows you to do many things, including making an app to launch our script.
  • Open Automator and select Application.  On the right side you will see a message that reads “Drag actions or files here to build your workflow”.
  • To the left of that we will see a bunch of options.  We want to select Run Shell Script and drag it to the right panel.
  • You will now see a Run Shell Script box with the words cat inside it.  Delete the word cat and paste in the script above or your script.
  • Finally go to file and save.  You now have an app that will open the script:)