Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Always launch Google Chrome beta with integrated Flash Web Browsers
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.]
    •    
  • Currently 1.75 / 5
  You rated: 1 / 5 (16 votes cast)
 
[11,255 views]  

Always launch Google Chrome beta with integrated Flash | 12 comments | Create New Account
Click here to return to the 'Always launch Google Chrome beta with integrated Flash' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Always launch Google Chrome beta with integrated Flash
Authored by: solefald on Apr 01, '10 08:41:54AM

May i ask what is the point of running Chrome with integrated Flash?



[ Reply to This | # ]
Always launch Google Chrome beta with integrated Flash
Authored by: vczilla on Apr 01, '10 09:50:25AM

I really don't know! I think their idea of having an integrated flash is weird. I used it as an example because Google introduced it recently (in Google Chrome 5.0.360.4 to be precise) and the question of how to have a 'shortcut' with a command-line argument on a Mac came often on their forum.



[ Reply to This | # ]
Always launch Google Chrome beta with integrated Flash
Authored by: tobylane on Apr 02, '10 01:50:51PM

Sandboxing, Chrome does a lot of it. There's a pretty interesting Chrome Comic somewhere explaining it.



[ Reply to This | # ]
Always launch Google Chrome beta with integrated Flash
Authored by: brh on Apr 05, '10 11:46:47AM

…But before if you were running Chrome/Chromium w/ plugins enabled (using Flash but not the new 'integrated Flash'), it was already sandboxed! Instead of a browser instance crashing, it would just crash the plugin instance, showing a black box with a sad plugin face where the Flash would have been.

More recent builds even made sure the process name indicated what plugin it was, so when your computer was running like crap and you opened up Activity Monitor, you immediately knew why…

…so I don't think sandboxing is necessarily the reason…?



[ Reply to This | # ]
Always launch Google Chrome beta with integrated Flash
Authored by: claudio.f.ibarra on Apr 01, '10 04:45:36PM

What would change in that command if you were using "Chromium.app" instead of "Google Chrome.app"??

Can someone post that as a comment?



[ Reply to This | # ]
Always launch Google Chrome beta with integrated Flash
Authored by: vczilla on Apr 02, '10 07:08:15PM

I'm a Chromium man too!It wouldn't work because thank god there's no integrated flash in Chromium (which is an open-source project so no proprietary software is bundled with it).H264 is disabled in libffmpeg for the same reason. As other commenters said the flash plugin is located there: "/Applications/Google Chrome.app/Contents/Versions/$CHROMEVERSION/Flash Player Plugin for Chrome.plugin". What worries me though is that according to "about:plugins" 2 instances of flash are loaded!



[ Reply to This | # ]
Possibly different Flash version, not tested
Authored by: deltaiscain on Apr 02, '10 05:02:08AM

I believe you can have it use the latest flash version, or the beta, by replacing the "Flash Player Plugin for Chrome.plugin" file in /Applications/Google Chrome/Contents/Versions/(latest version number)/
Haven't tested it though, so no idea if it works.



[ Reply to This | # ]
Possibly different Flash version, not tested
Authored by: vczilla on Apr 02, '10 07:13:54PM

I wouldn't do that if I were you.It's already the beta (Flash 10.1.51.91 for Chrome 5.0.366.0) in Chrome and one of the points of bundling flash is that they can auto-update it along Chrome.



[ Reply to This | # ]
Always launch Google Chrome beta with integrated Flash
Authored by: koyeung on Apr 03, '10 06:30:04AM

You may pass command args to *.app from command line: (after 10.6.2)
$ open -a /Applications/Google\ Chrome.app --args --enable-internal-flash

or wrap it using applescript, instead of modifying the app bundle.



[ Reply to This | # ]
Always launch Google Chrome beta with integrated Flash
Authored by: vczilla on Apr 05, '10 02:28:03AM

Or you can directly cd to the app/Contents/MacOS folder and launch it with an arg from here.I think the most elegant solution is the apple script one.But my goal here was to provide a one-liner (my original post on Google Chrome forum was a one-line version of this) for people not familiar with OS X.But as I said in the post it is clearly a weak solution because updates will undo it.



[ Reply to This | # ]
Always launch Google Chrome beta with integrated Flash
Authored by: brh on Apr 05, '10 11:58:29AM

The easiest way, IMO, is to open up the (Google Chrome, in this case) application bundle (right click, show package contents), go into Contents, and open up Info.plist.

Once you're in there, just change the value of the 'Executable file' key to include your args.

So, 'Google Chrome --enable-internal-flash' would be the new value for Executable file.

It's quick & easy, and it's 100% GUI for those who don't like to muck around in the Terminal. I personally love to muck around, but would still prefer to do it this way…



[ Reply to This | # ]
Always launch Google Chrome beta with integrated Flash
Authored by: vczilla on Apr 09, '10 12:30:48AM
Don't do that! It doesn't work and the application won't even launch once the os reload it from disk. If you change the value of CFBundleExecutable to $YOURNAME the os will look for $APP/Content/MacOS/$YOURNAME and since it doesn't exist:Boom!. It doesn't parse command line arguments there since they are not supposed to be there. There's no key dedicated to that purpose( there's one to set the executable's environment but not its arguments because the open cmd is there for that). You can find a list of all the settable key in a bundle plist there: http://developer.apple.com/iphone/library/documentation/General/Reference/InfoPlistKeyReference/Introduction/Introduction.html

[ Reply to This | # ]