*** MOVED ***

NOTE: I have merged the contents of this blog with my web-site. I will not be updating this blog any more.

2009-11-23

Google Chrome on Slackware

Google Chrome has been out for a while now, but only on Windows. There are pre-release Linux builds of Chrome, but they work out-of-the-box only on Ubuntu or Debian. As a Slackware 12.1 user, I couldn't therefore check out this browser and I was too lazy to build it myself. Fortunately for me, it turns out that the available builds can be made to work on Slackware with a little effort. Chrome turns out to be surprisingly usable and fast on Linux. That said, I'm not shifting from Firefox to Chrome yet, at least not right away.

The Chrome for Linux package from Google is currently available as a Debian package (a ".deb" file). You can extract the contents of this file using the standard ar (not tar) utility. One of the extracted files will be data.tar.lzma - you can decompress this file using the p7zip utility to get data.tar. Use tar to expand data.tar - the essential Chrome files will be extracted into the sub-folder opt/google/chrome. Copy this folder to a location of your choice.

Ironically, some of the libraries needed by Chrome are provided by Firefox (the version I have is 3.5.5). To get started, I had to create the following symbolic links within the Chrome installation folder to libraries in my Firefox installation folder (/usr/local/firefox):
    libnspr4.so.0d -> /usr/local/firefox/libnspr4.so
    libnss3.so.1d -> /usr/local/firefox/libnss3.so
    libnssutil3.so.1d -> /usr/local/firefox/libnssutil3.so
    libplc4.so.0d -> /usr/local/firefox/libplc4.so
    libplds4.so.0d -> /usr/local/firefox/libplds4.so
    libsmime3.so.1d -> /usr/local/firefox/libsmime3.so
    libssl3.so.1d -> /usr/local/firefox/libssl3.so
The Firefox installation folder also needs to be known to the dynamic loader while running Chrome - the easiest way to achieve this is to add the path to this folder to the LD_LIBRARY_PATH environment variable set in the google-chrome wrapper script in the Chrome installation folder. (This part is important - without this you'd get crashes in the NSS library while running Chrome.)

The next thing I had to do to get Chrome working on this machine was to install gconf and ORBit from Slacky, as these aren't installed with Slackware. Finally I had to update Cairo along with pixman to the latest respectively stable releases.

I could finally run the google-chrome wrapper script from Chrome to start the browser and play around with it.


It works fairly well and is quite fast, especially when starting up (unlike Firefox). Ports of both AdBlock Plus and FlashBlock are available for Chrome as extensions now, so you can drastically reduce the clutter on most web pages. Unfortunately they don't seem to work as well on Chrome as they do on Firefox. The web-sites for some Indian banks also don't work very well with Chrome, though they work quite well with Firefox - this seems more due to browser-identity-based behaviour modification on their part than due to some inherent flaw with Chrome.

I was quite fascinated by the detailed memory-usage statistics provided by the special "about:memory" URL in Chrome and how it managed to keep memory-usage in check during an extended browsing session. This is most likely due to its multiple-processes-based architecture. It definitely scores over Firefox in this area, which suffers from memory fragmentation in a single process after several memory allocations and releases.

Poking around the Chrome installation package, we find that the base URL for the package repository is http://dl.google.com/linux/deb/ - this being a standard Debian package repository, the meta-data for updated packages can therefore be obtained from http://dl.google.com/linux/deb/dists/stable/main/binary-i386/Packages.gz. Uncompress this file using gunzip and find the appropriate section for Chrome by looking for the line "Package: google-chrome-unstable" - the subsequent "Version:" line gives the latest available version of Chrome. If you wish to update your Chrome installation to this version, look for the subsequent "Filename:" line that provides the path to the installation package relative to the base URL of the package repository. For example, the URL of the package for the latest version of Chrome currently available is "http://dl.google.com/linux/deb/pool/main/g/google-chrome-unstable/google-chrome-unstable_4.0.249.4-r32475_i386.deb".

Hopefully there will soon be more generic builds of the browser that can run on most Linux distributions and automatically update themselves (just like Firefox). The workarounds given above, though not too complicated, are somewhat cumbersome. They are however enough to get you started with Chrome on a Slackware Linux PC so that you can play around with it and get a feel for it.

Impressive as Chrome is, I'm not yet shifting to it and am sticking with Firefox for regular browsing. The Firefox extensions that I depend on either do not work properly in Chrome or are not available for it. All the web-sites that I care for work properly in Firefox, while some do not work well in Chrome. I use a lot of keyboard short-cuts in Firefox - some of these work in Chrome while others don't (e.g. Ctrl+Shift+Enter to convert "foo" to "http://www.foo.org/" in the location bar). I tweak Firefox a lot using "about:config", which seems to be missing in Chrome. While Firefox seems slower and more bloated than Chrome, I hope that some day it becomes as good as, or even better than, Chrome.

Update (2009-11-23): I hadn't noticed it earlier, but Slacky seems to provide ready-made builds of Chrome for Slackware. For example, for 12.2 and for 13.0 (but not for 12.1).

Update (2009-12-02): Follow the Google Chrome Releases blog to know about the latest Chrome releases, including those in the developer channel.

I use a small shell script called "chkchrome.sh" to download and extract such releases using the method described in this post. I also have a small TAR archive that stores the symbolic links and overriding shared libraries needed to run Chrome and keep it in "$HOME/tmp/chrome-libs.tar.bz2" - the chkchrome.sh script automatically extracts this archive into the installation folder so that Chrome is ready to use once the script finishes executing successfully.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.