7

I want to run google-chrome in Kali Linux. But I am facing some problem. I have installed google chrome by following the steps mentioned here. It is successfully installed with chrome being displayed on

Application -> Internet -> Google Chrome

To run google chrome I followed Part 3 of the same series. There are three different ways listed on how we can run chrome. One option is it says to edit the file using leafpad leafpad /opt/google/chrome/google-chrome find the lines exec -a "$0" "$HERE/chrome" "$@" and append it with -user-data-dir. But the same file is a bit different in my computer, it looks something like this.

exec -a "$0" "$HERE/chrome" "$PROFILE_DIRECTORY_FLAG" \
"$@"

But even though I tried to add -user-data-dir to the end which now looks like

exec -a "$0" "$HERE/chrome" "$PROFILE_DIRECTORY_FLAG" \
"$@"-user-data-dir.

But it is not working anyway.

Then i tried another option. It says that first we have to create a user using
useradd -m chromeuser and then type gksu -u chromeuser google-chrome to run chrome. However I am getting the following error after running the last command. It says

/usr/bin/google-chrome: /usr/lib/i386-linux-gnu/libnss3.so: version `NSS_3.14.3' not found (required by /usr/bin/google-chrome)

How can I install chrome successfully?

  • I downloaded mozilla-nss from SlackBuilds. I have unzipped the tar file. Then changing the path to mozilla-nss(extracted folder) i am doing this root@kali:/Sanchit/mozilla-nss# sudo ./mozilla-nss.SlackBuild tar: /Sanchit/mozilla-nss/nss-3.12.4-with-nspr-4.8.tar.gz: Cannot open: No such file or directory tar: Error is not recoverable: exiting now – Sanchit Jain Sep 10 '14 at 9:20
  • can you please tell me what i doing wrong ? – Sanchit Jain Sep 10 '14 at 9:21
  • run this command: apt-get -f install – user182700 Aug 2 '16 at 13:41
8

Now you cannot run google-chrome as root user on updated versions, To run Google Chrome as standard user (while Logged in as Root)

Open terminal and type:

useradd -m chromeuser

or

adduser -u chromeuser

To run google chrome use command:

gksu -u chromeuser google-chrome

or

sux chromeuser google-chrome

If you don't want to run it from Terminal then add chrome in taskbar and then right-click on it, select properties and add the above command in the command parameter.

  • This is the proper answer and issue. – oemb1905 Oct 6 '16 at 19:23
  • Does not work on Ubuntu 14.04 – SuB Apr 23 '17 at 14:30
3

I'm using Debian, and with Chrome's last 2 updates, the sandbox seems to have began acting up, so I tried searching online if anyone have encountered it (though it may be also because of other software I have installed).

Replacing the last bits of lines with:

exec -a "$0" "$HERE/chrome" "$@" --user-data-dir

seemed to work for me before (prior to chrome's last 2 updates).

Now though, what seems to work is:

  1. Running chrome as non-root user, set the launcher property to:

    gksu -u nonRootUser /usr/bin/google-chrome-stable %U
    
  2. Running chrome as root user, set it to:

    /usr/bin/google-chrome-stable %U --no-sandbox --user-data-dir &
    
  • Actually, this seems like a better approach because you are not creating a new user just to make chrome work, but are rather assigning chrome to an existing user ... – oemb1905 Oct 7 '16 at 5:12
  • I add to add sudo to solution 1: sudo gksu -u nonRootUser /usr/bin/google-chrome-stable – user123456 Oct 28 '16 at 20:17
2

Removing the period at the end of -user-data-dir. should do the trick.

Also, the error message displayed specifies 02 dashes. Either one seems to work for me at the moment, but you may want to play it safe in case Google decides to force one way over the other. So --user-data-dir seems to be more proper.

protected by Community Mar 10 '17 at 12:23

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.