I have installed Google Chrome in Ubuntu 10.10. When I try to use in normal user, it is working fine.
Now if I want to use as a root it gives the following error:
Google Chrome does not run as root
Also when I tried the following command in terminal, it opens Google Chrome:
google-chrome --user-data-dir
I need a permanent solution for this. Can anybody give me idea about this?
i followed these steps
Thats it.... Start the browser...
STEP 1:
cd /opt/google/chrome
STEP 2: edit google-chrome file.
gedit google-chrome
STEP 3: find this line:
exec -a "$0" "$HERE/chrome" "$@"
.Mostly this line is in the end of google-chrome file.
Comment it out like this :
#exec -a "$0" "$HERE/chrome" "$@"
STEP 4:add a new line at the same place.
STEP 5: save google-chrome file and quit. And then you can use chrome as root user. Enjoy it!
It no longer suffices to start Chrome with
--user-data-dir=/root/.config/google-chrome
. It simply printsAborted
and ends (Chrome 48 on Ubuntu 12.04).You need actually to run it as a non-root user. This you can do with
where
chrome-user
is some user you've decided should be the one to run Chrome. Your Chrome user profile will be found at~chrome-user/.config/google-chrome
.BTW, the old hack of changing all occurrences of
geteuid
togetppid
in thechrome
binary no longer works.First solution:
1. switch off Xorg access control:
xhost +
2. Now start google chrome as normal user "anonymous" :
sudo -i -u anonymous /opt/google/chrome/chrome
3. When done browsing, re-enable Xorg access control:
xhost -
More info : Howto run google-chrome as root
Second solution:
1. Edit the file
/opt/google/chrome/google-chrome
2. find
exec -a "$0" "$HERE/chrome" "$@"
or
exec -a "$0" "$HERE/chrome" "$PROFILE_DIRECTORY_FLAG" \ "$@"
3. change as
exec -a "$0" "$HERE/chrome" "$@" --user-data-dir ”/root/.config/google-chrome”
Third solution:
Run Google Chrome Browser as Root on Ubuntu Linux systems
Run from terminal
or
Open the file opt/google/chrome/google-chrome and replace
to
It's working for chrome version 49 in CentOS 6. Chrome will give warning also.
Go to
/opt/google/chrome
.Open
google-chrome
.Append current home for data directory. Replace this:
With this:
For reference visit site this site, “How to run chrome as root user in Ubuntu.”