Windows-like app shortcut w/ command line arguments on Mac
Recently I was wondering how can I create similar shortcut that I used to create on Windows that could launch a desirable application with command line arguments. In my case I just installed awesome email app Postbox and one feature that I started missing is ability to launch Thunderbird-like Profile manager whenever I try to start the app. I tried doing that with aliases with not much of success and learned that OS/X doesn’t have similar concept of shortcuts. After a bit of googling I finally found a solution by Daniel Silva that used Automator app to create a launcher app that would simply run a bash script launching the app. Clever!
- Launch Automator (in the Applications folder).
- Choose “Application” as the type of document.
- Type “shell script” in the filter and double click on “Run Shell Script” to add a shell script to the application.
- On the right you will see a text box with the word “cat” in it. Delete this, then type the following command in the text box: open /Applications/Google\ Chrome.app –args –disable-images &
- Press Apple-s to save it. Name it “Chrome Lite” and put in the Applications folder.
- Now find Google Chrome in the Applications folder and single-click it to highlight it (don’t launch the application).
- Press Apple-i to get the info window on this application.
- Click on the icon inside the info window.
- Press Apple-c to copy the icon.
- Find the Automator Script you saved in step 6 and singleclick it to highlight it (don’t launch the application).
- Press Apple-i to get the info window on this application.
- Click on the icon inside the info window.
- Press Apple-v to paste the icon.
Daniel’s original instructions can be found here: http://silvanolte.com/blog/2012/05/11/how-to-open-a-mac-os-x-application-with-command-line-arguments/