How do I run Google Chrome as root? [closed]
Run from terminal
# google-chrome --no-sandbox --user-data-dir
or
Open the file opt/google/chrome/google-chrome and replace
exec -a "$0" "$HERE/chrome" "$@"
to
exec -a "$0" "$HERE/chrome" "$@" --user-data-dir --no-sandbox
It's working for chrome version 49 in CentOS 6. Chrome will give warning also.
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 asexec -a "$0" "$HERE/chrome" "$@" --user-data-dir ”/root/.config/google-chrome”
Third solution:
Run Google Chrome Browser as Root on Ubuntu Linux systems
Go to
/opt/google/chrome
.Open
google-chrome
.Append current home for data directory. Replace this:
exec -a "$0" "$HERE/chrome" "$@"
With this:
exec -a "$0" "$HERE/chrome" "$@" --user-data-dir $HOME
For reference visit site this site, “How to run chrome as root user in Ubuntu.”