https://www.slackwiki.com/api.php?action=feedcontributions&user=Perlna&feedformat=atomSlackWiki - User contributions [en]2024-03-29T08:35:08ZUser contributionsMediaWiki 1.40.0https://www.slackwiki.com/index.php?title=Chromium_browser&diff=662Chromium browser2012-03-29T11:11:39Z<p>Perlna: /* Resources */</p>
<hr />
<div>[[Category:Tutorials]]<br />
== Introduction ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Use Case ===<br />
<br />
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.<br />
<br />
While the [http://slackbuilds.org 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.<br />
<br />
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.<br />
<br />
== Getting started ==<br />
<br />
Chromium depends on <code>GConf</code> and <code>ORBit2</code>, and these should be installed first. Newer versions may also need the PAM library.<br />
<br />
=== Slackware 13.37 ===<br />
<br />
The above mentioned dependencies are included in the '''extra/''' tree of Slackware 13.37, so these can be simply installed by :<br />
<pre><br />
# slackpkg install GConf ORBit2 google-chrome-pam-solibs<br />
</pre><br />
<br />
=== Slackware 13.1 ===<br />
<br />
GConf and ORBit2 are availabe at the [http://slackbuilds.org slackbuilds.org] repository. These can be installed manually or using [http://sbopkg.org Sbopkg] :<br />
<pre><br />
# sbopkg -i 'ORBit2 GConf'<br />
</pre><br />
<br />
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 :<br />
<pre><br />
# installpkg ./google-chrome-pam-solibs-1.1.3-x86_64-1.txz<br />
</pre><br />
<br />
== Getting and installing the latest Chromium build ==<br />
<br />
Google maintains a repository of daily chromium builds that you can get from [http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Linux/ here] (32bit) or [http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?path=Linux_x64/ here] for 64 bit. Scroll down to the bottom and navigate to the latest build directory, and download the 'chrome-linux.zip' file there.<br />
<br />
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.<br />
<br />
To upgrade Chromium, just download the latest zip file and extract it where you previously did, overwriting the previous files.<br />
<br />
== Automating the Process ==<br />
<br />
The following script helps to automate the process of installing and upgrading Chromium. Edit the <code>INSTALLDIR</code> 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.<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
# Installation directory - change this to a directory of your choice<br />
# Please make sure the directory exists first, or the script won't work<br />
INSTALLDIR=$HOME/soft<br />
<br />
# Determine the architecture of the machine in use and set variables accordingly<br />
if [ -z "$ARCH" ]; then<br />
case "$( uname -m )" in<br />
i686) ARCH=i686 ;;<br />
*) ARCH=$( uname -m ) ;;<br />
esac<br />
fi<br />
<br />
if [ "$ARCH" = "i686" ];then<br />
DIRSUFFIX=""<br />
elif [ "$ARCH" = "x86_64" ]; then<br />
DIRSUFFIX="_x64"<br />
else<br />
echo "The ARCH should be either i686 or x86_64. Exiting."<br />
exit<br />
fi<br />
<br />
# Determine the build number of the latest build<br />
LATESTBUILD=$(curl http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux/LAST_CHANGE)<br />
<br />
# The URL to download from<br />
CHROMEURL="http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux"$DIRSUFFIX/$LATESTBUILD/"chrome-linux.zip"<br />
<br />
cd $INSTALLDIR<br />
if [ -e chrome-linux.zip ]; then # Check to see if `chrome-linux.zip` already exists<br />
mv chrome-linux.zip chrome-linux.zip.old # if it does, rename it to chrome-linux.zip.old as backup<br />
fi # in case the current build has problems<br />
wget -O chrome-linux.zip $CHROMEURL<br />
unzip -u -o ./chrome-linux.zip<br />
<br />
</pre><br />
<br />
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 :<br />
<pre><br />
$ cd $HOME<br />
$ mkdir .cron<br />
$ cp ./chromium-update.sh ./.cron/<br />
$ chmod a+x ./.cron/chromium-update.sh<br />
$ crontab -e<br />
</pre><br />
Add the following to your crontab :<br />
<pre><br />
# Run daily cron job at 13:20 every day:<br />
20 13 * * * ~/.cron/chromium-update.sh 1> /dev/null<br />
</pre><br />
This will run the script at 13:20 every day. See <code>man crontab</code> for more on how to customize your cron jobs.<br />
<br />
== Resources ==<br />
[http://www.chromium.org/Home Chromium home page]<br />
<br />
[http://en.wikipedia.org/wiki/Chromium_(web_browser)#Differences_from_Google_Chrome Differences from Google Chrome]<br />
<br />
[http://www.spywaretoolshed.com/ Spyware doctor]<br />
<br />
[https://wiki.archlinux.org/index.php/Chromium#Configuration Tips on configuration and customization from Archwiki]</div>Perlna