I have been using Chrome alongside Firefox for some time now, because I was not very happy with the way Firefox is growing fat and sluggish.
Chrome is nice and fast, and it allows me to save my preferences and bookmarks so I can keep them synchronized across computers – just like Firefox for which I setup my own private Sync server, However, Chrome is a closed-source app and I prefer to run open source self-built stuff where possible. Enter Chromium.
Chromium is the Open Source variant of the Chrome Browser. Both are part of the Chromium project which also has the Chrome OS as a product. Chromium and Chrome share the same codebase, and the closed-source Chrome browser is enhanced with some proprietary features like Adobe’s Pepper Flash plugin.
The slackbuilds.org site has a chromium SlackBuild script – it’s been there since Slackware 13.1 and Chromium 9. Building the package takes several hours which in my opinion is too long to simply ask people to compile it themselves. Just like with other big packages like LibreOffice, I decided to build my own package for Chromium and add that to my repository. What better time than right after the release of Chrome/Chromium 31.0.1650.57, last week!
I did some research, to see what I needed to put into my SlackBuild. The one on slackbuilds.org for instance, does not build the Native Client. It also does not define a Google API key or OAuth tokens. Without these API keys, some features of Chromium that use Google APIs will not be available in the browser. Think of Chrome sync, push messaging, remote desktop sharing, safe browsing, search suggestions and more.
Therefore I decided to request my own set of API keys from Google for my Chromium package build. I got those (it is an automatic process, and it is cost-free). The license restricts you in the use of these API keys: you are not allowed to make them public, they are for your personal use only. However there is an exception for distribition packagers and so I also applied with Google to allow me to share these API keys with the Slackware community. I got that approval in writing today and I will share my keys in future builds of the package.
For now, I chose to not to add them to the SlackBuild, because I want to have feedback from you Slackware users first, about the stability and the functionality of my Chromium build. Google can block a browser based on the API key with which it was configured and I want to make sure that everything is OK before uploading them into public view. I have uploaded my API keys so that you can recompile the package yourself and get a fully functional browser. It is explicitly not allowed to re-distribute my API keys when you create a modified version of my package!!
If you run my SlackBuild script without having API keys of your own, it will build you a perfectly working package – you just will not be able to sign into Chromium. If you want to recompile Chromium using my SlackBuild script and with Google API key, you can always generate your own API/OAuth keys by following the procedure outline on http://www.chromium.org/developers/how-tos/api-keys of course. Add the key definitions to a file called “chromium_apikeys” in the same directory as the chromium.SlackBuild, it will look somewhat like this:
_google_api_key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
_google_default_client_id=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.apps.googleusercontent.com
_google_default_client_secret=XXXXXXXXXXXXXXXXXXXXXXXX
Note that you are then not allowed to distribute these keys. Good luck! It compiles for 5 hours in my virtual machine and it needs many GB of swap file for the final link stage.
And then about Native Client. The Native Client is a sandbox technology that allows developers to write applications in native code (code targeting the machine hardware) and running that code inside the Chromium browser. The advantage is that these applications are able to run at near-native speed. Google has made several of these NaCL applications available in the Chrome Web Store. A nice gallery of NaCL applications is hosted at https://developers.google.com/native-client/community/application-gallery It features free-to-play games like Don’t Starve and Lara Croft, and even has a SSH secure shell ( I use that one on my own Chromebook).
I had no idea how to build the Native Client so I looked at how Suse, Arch, Debian and Ubuntu build their Chromium packages. Turns out, not everybody adds the Native Client. In the end I adopted the way Arch Linux builds it by downloading Google’s NaCl SDK and using that to build my own binaries.
There are two caveats at the moment, when building all of this. Both these points apply only to compiling Chromium… they do not apply to running the browser.
- On 32-bit Slackware 14.1 you’ll have to rebuild the “libelf” package with this patch:
--- libelf.SlackBuild.orig 2011-03-27 06:24:58.000000000 +0200
+++ libelf.SlackBuild 2013-11-22 17:24:17.740039844 +0100
@@ -38,7 +38,7 @@
NUMJOBS=${NUMJOBS:-" -j7 "}
if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686 -D_FILE_OFFSET_BITS=64"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
- On 64-bit Slackware 14.1 you’ll have to go multilib if you want to compile the Native Client. If you do not want to add multilib you can set the internal SlackBuild variable “USE_NACL” to “0” and the Native Client will not be built. You get all the other features still, of course.
Get my Chromium packages in one of the usual locations:
You can subscribe to the repository’s RSS feed if you want to be the first to know when new packages are uploaded.
Lovers of word games, you’ll have noticed that Native Client is shortened to NaCl which is another notation for salt. Guess what, apart from the salt, Google also added pepper to their browser. The Pepper Plug-in API (PPAPI) is a cross-platform API for plugins for web browsers, meant to replace the Netscape Plugin API (NPAPI) which (according to Google at least) is flawed and belongs to the past. The best known Pepper based plugin is Adobe’s Flash Player. Adobe abandoned their NPAPI based plugin (but they still apply security fixes) and focus on their PPAPI plugin for Chrome. Good news: Chromium works withe PPAPI plugins and therefore it is possible to extract the Flash plugin from Chrome and use it with Chromium. Check out this package (first install chromium, then chromium-pepperflash-plugin because the second package updates the chromium configuration defaults). Because this is a proprietary plugin, by installing it you agree to the Chrome End User License Agreement.
Note: Chrome/Chromium are going to block most NPAPI plugins at the beginning of 2014 and support for The Netscape API will supposedly be dropped altogether at the end of that same year. Another note: Mozilla’s Firefox will start enforcing “Click to Play” even before the end of 2013, which means that plugins will no longer be loaded automatically, but only after the user (you) clicks on a “Play” button. All plugins, meaning for instance the popular Java and SilverLight, but excepting the most recent Flash.
Tell me your experiences with Chromium for Slackware!
Eric
Note (20131124):
- I have uploaded my API keys so that you can recompile the package yourself and get a fully functional browser. It is explicitly not allowed to re-distribute my API keys when you create a modified version of my package!!
- Also, I have added Google Chrome’s proprietary PDF viewer as a separate package for Chromium: http://www.slackware.com/~alien/slackbuilds/chromium-pdf-plugin/ so that PDF files can be viewed inside the browser.
Recent comments