Install Chrome Ubuntu

If you’re using a version of Debian Linux like Ubuntu, Kali, Mint, etc, then this tutorial will help you in getting Google Chrome running on your system. The commands will work regardless of if you’re using 32-bit or 64-bit, only the .deb package you download will have either i386 (32-bit) or amd64 (64-bit) in the filename.

Installing Google Chrome

You can download Google Chrome at http://www.google.com/chrome. You’ll want to save the file, usually into the Downloads directory.

For the 64-bit version, you can run this command from the terminal to download it:

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

To install the package and force install of all its dependencies, run this command from the terminal:

sudo dpkg -i --force-depends google-chrome*.deb

Using the * in the filename will make this command work regardless of the version you downloaded.

If you still get dependency errors, try running this command in the terminal, then re-run the sudo dpkg command above:

sudo apt-get install -f

Running Google Chrome As Root User

Most Debian-based operating systems will have you create a standard user account, but in the case of Kali Linux, you’re usually logging in as the root user. Unfortunately, Google Chrome won’t run as a root user for security reasons.

You can read a few different options here.

The easiest way is to create a standard user. Google Chrome requires a Home directory for the user, so you’ll need to use the -m flag as shown below:

useradd -m chromeuser

Next, you can use the gksu command to launch Google Chrome:

gksu -u chromeuser google-chrome

You can also use the sux command:

sux chromeuser google-chrome

You can even edit your shortcut:
Now we’ll setup su to handle the passing of X credentials between the users. We’ll add pam_xauth to forward it, and configure root to pass credentials to the chrome user.

sed -i 's/@include common-session/session optional pam_xauth.son'
/etc/pam.d/su
mkdir -p /root/.xauth
echo chrome > /root/.xauth/export

Then run:

su -l -c "/usr/bin/google-chrome-beta" chromeuser

You should be all setup and ready to go now.