manual deployment of extensions in chromium

Chrom(ium) let’s us install an extension (crx file) by putting it into a special directory. The details are discussed on this page.

In particular the page says to use these directories on linux.

  /opt/google/chrome/extensions/ 
  /usr/share/google-chrome/extensions/

However, these directories don’t work with chromium, so presumably they work only in chrome (chromium v chrome). This fact wasn’t documented anywhere that I came across, so it took me a while to figure out.

From src/chrome/common/chrome_paths.cc in the chromium source code.

#if defined(OS_LINUX)
// The path to the external extension <id>.json files.
// /usr/share seems like a good choice, see: http://www.pathname.com/fhs/
const base::FilePath::CharType kFilepathSinglePrefExtensions[] =
#if defined(GOOGLE_CHROME_BUILD)
    FILE_PATH_LITERAL("/usr/share/google-chrome/extensions");
#else
    FILE_PATH_LITERAL("/usr/share/chromium/extensions");
#endif  // defined(GOOGLE_CHROME_BUILD)
#endif  // defined(OS_LINUX)
#if defined(OS_LINUX)
    case chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS: {
      cur = base::FilePath(kFilepathSinglePrefExtensions);
      break;
    }
#endif

Summarily, the chromium browser requires that external extension preference files are put in /usr/share/chromium/extensions.

Information correct as of this commit.

commit a9eae08445c9dd7cca02bc14b18ed1d140a6347f
Author: halyavin <halyavin@chromium.org>
Date:   Fri Mar 20 14:06:55 2015 -0700
 
4
Kudos
 
4
Kudos

Now read this

accessing digital cert with javascript

How can we get access to the digital certificate for the page that our browser just loaded using javascript? It’s not possible in Chrome, but we can do it using an extension in Firefox. This stackoverflow question goes into more details.... Continue →