Installing Chrome / Chromium on Kali Linux (plus tutorial on editing sources.list)

Chromium BrowserSo you’ve been wanting to ditch Iceweasel (Firefox) on you Kali Linux Distro right?So how about using Chrome / Chromium for a change? Worry not, you can easily switch or use both browsers in Kali Linux. All you have to do is add the official Debian repository to sources.list install and configure chromium. Sounds pretty easy right? Well sort of. Of course there will be some hiccups while installing Chromium (on Kali Linux) along the way that is why I decided to make this post in order to help fellow newb users (like us) survive installing that friggin popular browser in Kali Linux.

UPDATE (2016-09-19): To install chromium in Kali Linux, all you have to do is to invoke su or sudo and type this in the terminal: “apt-get install chromium”. Then answer yes and all the required packages will be installed automatically. 

Installing chromium via terminal
Installing chromium via terminal

Thanks to fr2623 for reminding me to update this post.

UPDATE (old): Turns out you don’t have to edit the source.list to install Chromium. I have tried installing Chromium from a fresh install of Kali Linux. You could just skip editing the source list and go directly to installing Chromium using the terminal. However, I will leave the source list tutorial in the post for future reference.

Configure the Source list

The the source list or source.list is define by the Linux manual as the

List of configured APT data sources

Personally for me, this source.list is a file that summarizes all internet address where your Linux distro will search for a particular application just like an app store. If you’re still confused of what is a source list is, you can imagine it as a mega App Store which can contain all the app entries from different app stores like Amazon, Google, Yandex, Nokia and others. Pretty amazing right? So what should we do with this source.list? We edit it and incorporate the “app store” from Debian. But first we need to know what to place on the source list. Lets head to my favorite Debian Source List Generator and generate our own source list. Here is an example of the options that I usually select in generating my source list.

Debian Source List Generator

Yeah. Options. Options everywhere. But worry not, I am here to help you. In:

  • Country: Select the nearest country where you live in. This option might determine your download speed from the said repository.
  • Release: Select the type of software you wanted to install. I personally prefer selecting the “Testing” since the packages / apps here are nearly updated to match the package or app author’s release. You can call packages on this branch as somewhat bleeding-edge packages (not super stable packages but very much updated)
  • Architecture: Select the type of OS that you are running. It’s either 32-bit or 64-bit
  • Sources: I normally select Main and Contrib since I do not want Security / OS Updates coming from Debian (we have Kali Linux update branch on our repository by default!). Non-free is well, proprietary packages.
  • Include source packages: Unless I wanted to build the app from scratch by compiling them, I won’t bother checking this option.

With those options briefly explained, click the “Generate sources.list” button. After clicking that button it will give you the line that we will have to paste in the source list. Here is a sample of that generated line from the source list generator:

deb http://ftp.jp.debian.org/debian testing main contrib

Now that we have our sources.list entry, lets fire up terminal and start typing:

nano /etc/apt/source.list

and press enter. The said command will open the sources/list file in your terminal and will be ready for editing. Oh by the way, here is an example of what a sources.list looks like:

## Security updates

deb http://security.kali.org/kali-security kali/updates main contrib non-free

## Debian Stuff ##

deb http://ftp.jp.debian.org/debian jessie main

## Contrib ##

deb http://ftp.jp.debian.org/debian jessie contrib

Yours might not look the same but don’t worry. It’s perfectly fine. Anyway, after opening the sources.list, navigate using keyboard to the bottom part and type:

## Debian Sources

In a the new line after ## Devian Sources paste the source list that you have generated earlier. Then after you have made the appropriate changes, press

CTRL + X

and press

Y

After returning to the terminal, try getting some beer and congratulate yourself! You have just learned how to edit the source.list of a Linux Distro! Anyway, lets move on. We have more work to do below.

Installing Chromium (via Terminal)

Install Chromium

Now, we are going to learn how to install Chromium via the Terminal. First fire up terminal, ready yourself, pray that everything is gonna be easy and type:

sudo apt-get update && sudo apt-get install chromium

Also, you will have to confirm and press

Y

to continue. Now, this will update the sources (App Store) and install chromium automatically. Pretty easy right? Don’t worry. I was kidding about the hard part. After installing Chromium, you can now run it in Applications > Internet. Go ahead. Run it.

Opening Chromium. Opening. Opening and…

Chromium as Root

Heh. You were just trolled! Do not panic!Its normal. Normally Chromium could not be run as root. To get past this obstacle, we have to configure Chromium to run even if we are using the default user in Kali Linux (which is root). This will again involve the Terminal so get ready to type! First we have to go and edit the config file of Chromium (/etc/chromium/default). Now lets type:

nano /etc/chromium/default

and press enter. By default you will see this in the default file:

# Default settings for chromium. This file is sourced by /bin/sh from
# /usr/bin/chromium

# Options to pass to chromium
CHROMIUM_FLAGS=”–password-store=detect”

What we are going to do is edit this config file to allow us to run Chromium as root. According from brav0hax of Kali Linux Forum, in order to bypass the root notice which Chromium is giving us, we need to change the default flag to (or add it):

–user-data-dir

So in short, the new default file will be:

# Default settings for chromium. This file is sourced by /bin/sh from
# /usr/bin/chromium

# Options to pass to chromium
CHROMIUM_FLAGS=”–user-data-dir”

or

# Default settings for chromium. This file is sourced by /bin/sh from
# /usr/bin/chromium

# Options to pass to chromium
CHROMIUM_FLAGS=”–password-store=detect –user-data-dir”

Now. After doing the appropriate changes, press

Ctrl + X

and press

Y

to save changes. Congratulations! You can now run Chromium on you Kali Linux box without any hiccups! Enjoy!

Bonus Tip:

  • You can add –incognito to always run Chromium in Incognito mode just like this: CHROMIUM_FLAGS=”–user-data-dir –incognito” or CHROMIUM_FLAGS=”–password-store=detect –user-data-dir –incognito”
  • Also, you can just comment out the default values so that it will stay there with the file by adding # in front of it on a new line just like this #–password-store=detect
  • For a list of arguments for Chromium, head to Peter Beverloo’s Site.

Hope you learned something new today! Cheers!

Advertisements

13 thoughts on “Installing Chrome / Chromium on Kali Linux (plus tutorial on editing sources.list)

  1. … [Trackback]

    […] There you will find 43616 more Infos: lockone.wordpress.com/2014/03/03/installing-chrome-chromium-on-kali-linux-plus-tutorial-on-editing-sources-list/ […]

    Like

  2. Hi! I’ve been following your web site for a long time now and finally got the bravery to go ahead and give you a shout
    out from Houston Tx! Just wanted to mention keep up the
    excellent job!

    Like

  3. Everything worked fine except for the incognito mode. I tried it both ways and neither allowed the browser to open so I just stuck with the normal mode. Any ideas?

    Like

  4. This post is not valid anymore :
    apt update; apt-get install chromium-browser

    Package chromium-browser is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    apt-cache search chromium

    chromium – web browser
    chromium-l10n – web browser – language packs
    chromium-bsu – fast paced, arcade-style, scrolling space shooter
    chromium-bsu-data – data pack for the Chromium B.S.U. game

    apt-get install chromium

    and yet, I get the following error after the install of chromium

    dpkg: dependency problems prevent configuration of vpnoneclick:
    vpnoneclick depends on chromium-browser; however:
    Package chromium-browser is not installed.

    apt-get install -f –> gives :

    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Correcting dependencies… Done
    The following packages will be REMOVED:
    vpnoneclick
    0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.

    Like

Care to comment?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s