Wednesday, August 4, 2021

Run Google Chrome as root in Linux without no sandbox

If you are facing issue while running Google Chrome or other softwares as a root user on Linux systems like Ubuntu, CentOS, KALI, Fedora etc, here is the guide for you.


# Create a User for Google Chrome or other software

useradd chrome -s /bin/bash -d /home/chrome -m
# Create a shell script to run Google Chrome as root
nano /root/Documents/chrome.sh

# Add following content in the script

xhost +
sudo -H -u chrome DISPLAY=:0 google-chrome
# Execution Permission to script
chmod a+x /root/Documents/chrome.sh

 # Run the script by command line

bash /root/Documents/chrome.sh

or double click on the sh file. 

You should be able to run Chrome or other softwares like skype as a root user.

No comments:

Post a Comment