Saturday, 10 May 2014

[Porting to Linux] Run Chrome as Root

Recently I removed my Windows 8.1 student licensed OS and switched over completely to Kali Linux. So in the next few blogs I might be only writing about all the configuration changes I did which might be needed by every Windows addict, who in time would face the "side effects" of using windows, and crib about the numerous differences and the ease to use. However, if you are able to understand the basic configurations you are required to do as a Linux user, your life would be made a hell easier than what you'd expect in case of any type of error that needs debugging. Also, the security is "imba" compared to Windows.

This post is focused on Google Chrome. As a windows user, there was basically no problem in installing and running chrome! As a result, I got my browser sync'd to my email, and the bookmarks, the addons, the data is basically my life.

Installing Google Chrome:
The install setup can be got by going to the webpage of google chrome and downloading the setup for your system. As I am using amd64 Kali Linux, which is a debian based distro, I'd continue with the amd64 .deb package. To install, just traverse to the setup directory via terminal and type
  1. dpkg -i filename.deb

With this, the installation is done. However, there is a problem! Google chrome doesn't run as root. To fix this, we follow a few simple steps:

  1. Open Terminal
  2. Traverse to the chrome directory
    cd /opt/google/chrome
  3. Open the Google Chrome file on your favorite editor
    nano google-chrome
  4. Traverse to the end of the file and at the last line, add
    So, the last line should now look like
    exec -a "$0" "$HERE/chrome" "$@" --user-data-dir
That is it. With this change of settings, you should be able to run chrome as root, without any problem.
Now enjoy surfing on your Chromium :)
ShrekzZzCount Up