Saturday, April 18, 2015

Solution For Google Chrome Can Not Be Run As Root

How to fix Google Chrome and Chromium Can not run be as root - Taken from problem using google chrome in Backtrack and Kali Linux, I try to wite and post in this blog for tutorial who got same problem Google Chrome can not be run as root.

I hope this post will help you. OK! You can follow 2 choices to solve this. They are :
  1. Run Google Chrome as Root user in Kali Linux
  2. Run Google Chrome as Standard User (while Logged in as root) in Kali Linux

This tutorial tested and work perfectly Google Chrome and Chromium browser.

1. Run Google Chrome as Root user in Kali Linux

This is the first way to run Google Chrome after install it on Kali Linux. Using nano/gedit or your favorite text editor type and run :

gedit /opt/google/chrome/google-chrome

Go to the end of the file and find exec -a "$0" "$HERE/chrome" "$@" After you've found it, add “–user-data-dir” (without the quotes). So it would be like this :

Google Chrome Can Not Be Run As Root

Save the files. Now you can run Google Chrome as root user. Please note that latest Google Chrome won't be run however using this way. So, try next choice!

2. Run Google Chrome as Standard User (While Logged in as Root)

The second way to run Google Chrome in Kali Linux is run using sux. Sux is a wrapper around the standard su command which will transfer your X credentials to the target user. This is a much better and cleaner option to run a program as a different user in X while logged in as another.

After you done setting up for add new user, open your terminal and follow this command. Add a non-root standard user :

Make sure you have sux installed in your Kali. To install sux type and run through following command :

apt-get install sux

Then add user using this command :

useradd -m chromeuser

You can look, -m flag in command above will create home directory for the new user. Next to run Google Chrome in Kali Linux, open your terminal and type the following command :

sux chromeuser google-chrome

Cherss! You have Google Chrome running in root X with chromeuser ( non-root user ). If you're doesn't like and feel buggy to launch Chrome by using that command, you can change it via menu. Remove then change the default command. See the screenshot for more details :

how to solve google chrome and chromium can not be run as root

Update!

Google dropped Google Chrome for Linux x86. Please read How to Fix Failed To Fetch Google Chrome Repository After Running apt-get update.

So that is I can write about 'Solution For Google Chrome Can Not Be Run As Root'. Please like share this guide with your social media. Hope you have enjoyed this article. Thanks for visit!

Related Post

3 Responses to "Solution For Google Chrome Can Not Be Run As Root"

  1. Yes work but no is good open terminal forever and do sux chromeuser google-chrome

    ReplyDelete