Always launch Google Chrome beta with integrated Flash

Apr 01, '10 07:30:00AM

Contributed by: vczilla

This hint is to allow people to use a command-line argument automatically when they launch an app (a bit like Windows' shortcuts). I use Google Chrome's new integrated Flash mode as an example, since it's been asked often enough on the Chrome blog.

I already wrote this in a comment on the Chrome blog,but I thought it could be a useful hint, so here is a more readable version. Enter these commands in Terminal (the $ is the prompt; don't enter that):

$ cd "/Applications/Google Chrome.app/Contents/MacOS/"
$ sudo mv "Google Chrome" Google.real
$ sudo printf '#!/bin/bash\ncd "/Applications/Google Chrome.app/Contents/MacOS"\n"/Applications/Google Chrome.app/Contents/MacOS/Google.real" --enable-internal-flash "$@"\n' > Google\ Chrome
$ sudo chmod u+x "Google Chrome"
You need to have write access to your /Applications folder for this to work. The only minor inconvenience is that the real executable is now Google.real, so you have to reauthorize it with LSD or your firewall. And, of course, you can do this with others' apps.

[robg adds: I tested this, and it seems to be working as expected.]

Comments (12)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20100331014010995