How to Run Google Chrome as root on CentOS / Ubuntu / Debian / Fedora

7

In my last post, I have shown you how to install Google Chrome on CentOS 7 / Ubuntu 16.04 / Linux Mint / Debina 9. I have installed Google Chrome as root user and when I tried to start Google Chrome it given the following error.

Run Google Chrome as root - Error
Run Google Chrome as root – Error

I was looking for the solution; by googling, I have found an easy way to enable root user to run Google Chrome.

Follow the steps to run Google Chrome as root user in CentOS / Ubuntu / Debian / Fedora / LinuxMint.

Open a terminal.

Edit the /usr/bin/google-chrome and add the “–no-sandboxat the end of the last line (Line No: 42).

vi /usr/bin/google-chrome

FROM:

Line Number: 35

export LD_LIBRARY_PATH

export CHROME_VERSION_EXTRA="stable"

# We don't want bug-buddy intercepting our crashes. http://crbug.com/24120
export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME

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

TO:

export LD_LIBRARY_PATH

export CHROME_VERSION_EXTRA="stable"

# We don't want bug-buddy intercepting our crashes. http://crbug.com/24120
export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME

exec -a "$0" "$HERE/chrome" "$@" --no-sandbox

That’s all. Now you can start Google Chrome from the menu as root.

Further Reading

You might also like

How to Run Google Chrome as root on CentOS / Ubuntu / Debian / Fedora

7