Chromium browser: Difference between revisions

From SlackWiki
Jump to navigation Jump to search
m (Reverted edits by Perlna (talk) to last revision by Klickback)
 
Line 107: Line 107:


[http://en.wikipedia.org/wiki/Chromium_(web_browser)#Differences_from_Google_Chrome Differences from Google Chrome]
[http://en.wikipedia.org/wiki/Chromium_(web_browser)#Differences_from_Google_Chrome Differences from Google Chrome]
[http://www.spywaretoolshed.com/ Spyware doctor]


[https://wiki.archlinux.org/index.php/Chromium#Configuration Tips on configuration and customization from Archwiki]
[https://wiki.archlinux.org/index.php/Chromium#Configuration Tips on configuration and customization from Archwiki]

Latest revision as of 14:08, 29 March 2012

Introduction

Chromium is an open source web browser from Google. It is based on the WebKit rendering engine and is the upstream project for Google's popular Chrome Web Browser.

Keep in mind that Chromium is the testing branch of the Chrome web browser, and is not recommended for mission-critical systems. Consider using Google Chrome or Mozilla Firefox for production systems.

Use Case

This tutorial explains how to install the latest Chromium build on Slackware and automate the process of updating it regularly. It is aimed at users on a personal desktop or laptop, especially on a single-user system.

While the slackbuilds.org project provides excellent quality build scripts for Chromium, downloading 140MB+ source code and doing compilations that often take more than a couple of hours to complete is generally not feasible for people with laptops, slower computers or slow internet connections.

Therefore, this guide aims on how to automate the process of installing and updating Chromium using daily binary builds that are much smaller in size and take up negligible resources for the install and update process, thus helping the user always run the latest and greatest builds without the hassle of downloading and compiling the source code.

Getting started

Chromium depends on GConf and ORBit2, and these should be installed first. Newer versions may also need the PAM library.

Slackware 13.37

The above mentioned dependencies are included in the extra/ tree of Slackware 13.37, so these can be simply installed by :

# slackpkg install GConf ORBit2 google-chrome-pam-solibs

Slackware 13.1

GConf and ORBit2 are availabe at the slackbuilds.org repository. These can be installed manually or using Sbopkg :

# sbopkg -i 'ORBit2 GConf'

Get the google-chrome-pam-solibs package 32-bit 64-bit and install it :

# installpkg ./google-chrome-pam-solibs-1.1.3-x86_64-1.txz

Getting and installing the latest Chromium build

Google maintains a repository of daily chromium builds that you can get from here (32bit) or here for 64 bit. Scroll down to the bottom and navigate to the latest build directory, and download the 'chrome-linux.zip' file there.

Extract the zip file to a place of your liking (I like to keep mine in /home/username/soft), and run the 'chrome-wrapper' binary that will run Chromium and also generate a 'chromium-dev.desktop' file in /home/user/.local/share/applications/ and a Chromium entry will appear in your KDE or Xfce menu. Copy that file to your desktop if you prefer a desktop shortcut.

To upgrade Chromium, just download the latest zip file and extract it where you previously did, overwriting the previous files.

Automating the Process

The following script helps to automate the process of installing and upgrading Chromium. Edit the INSTALLDIR variable to your liking - that is the place where chromium will be installed. Its recommended to keep it in a folder in your home directory to make it easy to manage. make sure the folder exists before running the script, or the script will fail.

#!/bin/bash

# Installation directory - change this to a directory of your choice
# Please make sure the directory exists first, or the script won't work
INSTALLDIR=$HOME/soft

# Determine the architecture of the machine in use and set variables accordingly
if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i686) ARCH=i686 ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

if [ "$ARCH" = "i686" ];then
  DIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  DIRSUFFIX="_x64"
else
  echo "The ARCH should be either i686 or x86_64. Exiting."
  exit
fi

# Determine the build number of the latest build
LATESTBUILD=$(curl http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux/LAST_CHANGE)

# The URL to download from
CHROMEURL="http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux"$DIRSUFFIX/$LATESTBUILD/"chrome-linux.zip"

cd $INSTALLDIR
if [ -e chrome-linux.zip ]; then                    # Check to see if `chrome-linux.zip` already exists
        mv chrome-linux.zip chrome-linux.zip.old    # if it does, rename it to chrome-linux.zip.old as backup
fi                                                  # in case the current build has problems
wget -O chrome-linux.zip $CHROMEURL
unzip -u -o ./chrome-linux.zip

To automate the process, first save the script as chromium-update.sh and add it to your users's cron jobs. Here is an example on how to set it up :

$ cd $HOME
$ mkdir .cron
$ cp ./chromium-update.sh ./.cron/
$ chmod a+x ./.cron/chromium-update.sh
$ crontab -e

Add the following to your crontab :

# Run daily cron job at 13:20 every day:
20 13 * * * ~/.cron/chromium-update.sh 1> /dev/null

This will run the script at 13:20 every day. See man crontab for more on how to customize your cron jobs.

Resources

Chromium home page

Differences from Google Chrome

Tips on configuration and customization from Archwiki