Chromium browser: Difference between revisions

From SlackWiki
Jump to navigation Jump to search
(Created page with "== 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 Bro...")
 
No edit summary
Line 3: Line 3:
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.
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.


This tutorial explains how to install the latest Chromium build on Slackware and automate the process of updating it regularly. A single user system is assumed, however, modifying it for a multi-user system should be simple enough.
This tutorial explains how to install the latest Chromium build on Slackware and automate the process of updating it regularly. A single user system is assumed. However, adapting this tutorial for a multi-user system should be simple enough. Also keep in mind that Chromium is the '''testing''' branch of the Chrome web browser, and is not recommended for mission-critical systems. Consider using [http://www.google.com/chrome Google Chrome] or [http://www.mozilla.org/en-US/firefox/ Mozilla Firefox] for production systems.


== Getting started ==
== Getting started ==
Line 23: Line 23:
</pre>
</pre>


Get the <code>google-chrome-pam-solibs</code> package [http://slackware.osuosl.org/slackware-13.37/extra/google-chrome/google-chrome-pam-solibs-1.1.3-i486-1.txz 32-bi] [http://slackware.osuosl.org/slackware64-13.37/extra/google-chrome/google-chrome-pam-solibs-1.1.3-x86_64-1.txz 64-bit] and install it :
Get the <code>google-chrome-pam-solibs</code> package [http://slackware.osuosl.org/slackware-13.37/extra/google-chrome/google-chrome-pam-solibs-1.1.3-i486-1.txz 32-bit] [http://slackware.osuosl.org/slackware64-13.37/extra/google-chrome/google-chrome-pam-solibs-1.1.3-x86_64-1.txz 64-bit] and install it :
<pre>
<pre>
# installpkg ./google-chrome-pam-solibs-1.1.3-x86_64-1.txz
# installpkg ./google-chrome-pam-solibs-1.1.3-x86_64-1.txz
Line 93: Line 93:
</pre>
</pre>
This will run the script at 13:20 every day. See <code>man crontab</code> for more on how to customize your cron jobs.
This will run the script at 13:20 every day. See <code>man crontab</code> for more on how to customize your cron jobs.


== Resources ==
== Resources ==

Revision as of 16:07, 23 September 2011

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.

This tutorial explains how to install the latest Chromium build on Slackware and automate the process of updating it regularly. A single user system is assumed. However, adapting this tutorial for a multi-user system should be simple enough. Also 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.

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 $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