Enable extensions in Chromium (or Chrome)

Dec 02, '09 07:30:00AM

Contributed by: hannibal_horn

Chromium (and Chrome) has lots of useful features that can only be enabled via command line switches when launching, such as extensions, user script support, and bookmark sync.

Rather than launch via the command line every time, I use the following script to patch the --enable-extensions command line arguments into the application bundle itself:

#!/bin/sh
# Patches the Chromium application installation with command line arguments to enable extensions.
set -o errexit
app=${1:-/Applications/Chromium.app}
cat >$app/Contents/MacOS/Chromium.wrapper <<EOF
#!/bin/sh
exec $app/Contents/MacOS/Chromium --enable-extensions "\$@"
EOF
chmod 755 $app/Contents/MacOS/Chromium.wrapper
defaults write $app/Contents/Info CFBundleExecutable Chromium.wrapper
Additional arguments that can be useful are --enable-sync and --enable-user-scripts.

[robg adds: To use the above, save it in Terminal text editor, make it executable (chmod a+x scriptname), and then run the script. You can find Chromium Mac builds here, and this hint explains how to automatically update to the latest build. I tested this script, and it seemed to work with the latest build of Chromium. Note that the script assumes Chromium is in /Applications; if you have it elsewhere, you'll need to modify the app=... line.]

Comments (11)


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