Linux, Windows, Virtualization, OpenSource & Blogging

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

6

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.

POSTS YOU MAY LIKE -:)

You might also like
  • Amarjeeta

    Thanks….

  • Julien

    Worked Well !!!

    # vi /usr/bin/google-chrome
    ( didn’t worked for me, I think we don’t have enough dependencies installed on server for that )

    # nano /usr/bin/google-chrome

    worked for me.

    Thanks

  • saptarshi Mallick

    Thank you for this solution

  • Paolo

    Ok, well done.
    Thanks

  • sathish

    [root@test ~]# google-chrome
    Aborted (core dumped)

    • kiko

      Same issue with me. Im using CentOS release 6.8 (Final)
      Linux KiKo1606 2.6.32-642.1.1.el6.x86_64 #1

      [root]# google-chrome-stable –disable-gpu
      Aborted
      [root]# google-chrome-stable
      Aborted

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

6