One of the best features of Chrome is the ability to create "application shortcuts" that let you launch web sites as stand alone applications. Unfortunately, application shortcuts are disabled in Chrome for Macs. While other options exist to create site specific browsers (SSB) based on Firefox (Prism) or Safari (Fluid), I'm a big fan of Chrome, so I wrote a little script that lets you create your own Chrome application shortcuts on a Mac. The script basically automates a solution that I found when looking around online, at the end of this post.
We haven't talked much about site-specific-browsers or application shortcuts (Chrome's version of SSBs), but they can be a great way to make your web applications feel more like desktop apps. SSBs basically provide a single purpose application that launches a single web site with it's own window, process, and icon. This allows you to manage your web applications along side your desktop apps. In the case of the solution shown here, it also lets you manage separate profiles for each of your web apps, letting you easily handle multiple logins, or have different sets of extension for each app.
If you've ever run a shell script before, it should be pretty obvious how this script works. Either way, here's a quick run down about how to create an Application Shortcut using the script.
Download the script
To get started creating your own Chrome application shortcuts on your Mac, download the script from here, and save it to your Desktop (or wherever you'd like). To run the script, you'll need to open up Terminal.app, which you can find through Spotlight or in your Applications folder. Once you've launched the terminal, change to the directory where you saved the script (e.g., type 'cd ~/Desktop' if you saved the script on your Desktop). Make sure that the script is executable with the command 'chmod +x makeApp.sh'.
Prepare the app
The next step is to decide what site you want to use to create an Application Shortcut. For this example, I'm going to create an app for Google Analytics. To create an Application Shortcut, you need three things:
With these three things in hand, you're ready to create the application shortcut. Run the script by typing './makeApp.sh' into the Terminal window. The script will prompt you to enter the three pieces of information from above. For the url, you can drag from the address bar in your web browser and drop in the terminal to transfer the url. For the icon, you can do the same thing by dragging the image file into the terminal. After answering those three questions, your web app will be created and ready to run. I should also point out that the script assumes that Chrome is installed in '/Applications/Google Chrome.app'; if you have Chrome installed elsewhere, it should be pretty obvious how to change the script if you open it up with a text editor.
Run the app
Once you've created your application shortcut, you can launch it through Spotlight, or in the Applications folder of your home directory. Once you've launched the app, you can set the icon to stay in the dock even after closing the app. If the site you've created the app for requires a log in, you'll need to log in (and save the password if you'd like). This is necessary because these application shortcuts each have their own Google Chrome profile. While this means that bookmarks, passwords, and extensions are not shared with your main instance of Chrome. It also means you can stayed logged in to your account without affecting your main browsing session. If you want to add extensions to an app shortcut, you can create a new window (Apple-N) to get a full Chrome window in the correct profile. It's also worth noting that the behavior of these shortcuts isn't perfect after closing the last window without quitting out of the app. If you do so, and then click the icon again, it will launch your Chrome homepage rather than the correct app. To avoid this problem, just always quite the app (Apple-Q) when closing the last window. Aside from these drawbacks, your application shortcuts should behave just like other apps.
Once you've gone through this procedure once, you can repeat it to create apps for all your commonly used sites that might be better served with their own icon in the dock and in your application switching. The separate profiles also means that you could have, for example, multiple versions of Gmail that automatically stayed logged in to different accounts. If you run across any problems with the scripts, feel free to let me know in the comments and I'll try to help out.
In the comments of this post, Mait Vilbiks posted a version of this same idea using AppleScript, which you can download from here:
I have a couple of friends (recent PC defectors), who I knew would start bugging me with questions, so I set out to make this a little friendlier using AppleScript, and ended up with a pretty much usable application. http://mait.vilbiks.com/files/createGcApp.dmg [This link seems to be dead, so just use the link above]
I'm posting this file here absolutely "AS IS", source included, I'm not taking any responsibility if it breaks anyone's system or something else happens. It works as intended for me and a couple others so I thought I'd share it, should be quite safe.
The functionality is identical (but with support for spaces in filenames) and the interface is a lot less daunting if you're not used to the terminal. I've also talked a little bit more about it in this post. Thanks to Mait for the sharing this easier version!