Hey guys, If you are reading this, then I know that you wanna know that how to run Google Chrome as a root user on Linux. Well, this is the right place to know that. You already know that Chrome can't run when you are using your Linux as a superuser, but it can run with "-no-sandbox" flag. So, we have to options here which we will be discussing in this post. So let's get started...
As I just mentioned that we have two options to run chrome when we are root.
Hopefully this will be able to run chrome. The problem with this is, that every time you close Google Chrome completely you are gonna have to re-run the command from terminal, which can be exhausting. That's when method 2 comes in to save the day.
This is it guys, hope this post helps you.
Now, you can help us. And you don't have to pay or anything like that. All you have to do is like us and share us on social media. There is Facebook widget on the top right of the page, sitting there and waiting for you to click. Just hit that like button and also share us.
Thank you.
As I just mentioned that we have two options to run chrome when we are root.
- The first option is, that we use terminal to run Chrome with "-no-sandbox" flag.
- And the second option is, that we make some changes to the desktop entry file.
Run Chrome from Terminal
- First open your terminal window and run this command
google-chrome -no-sandbox
Hopefully this will be able to run chrome. The problem with this is, that every time you close Google Chrome completely you are gonna have to re-run the command from terminal, which can be exhausting. That's when method 2 comes in to save the day.
Edit the Desktop Entry File
This method is what I use. It is more convenient.
- Open your terminal and run the command given below (if you don't have leafpad installed, then please go ahead and install that first, or use any other text editor program)
sudo leafpad /usr/share/applications/google-chrome.desktop
- This will open Chrome's Desktop Entry file in leafpad.
- Now scroll down a bit till you see
Exec=/usr/bin/google-chrome-stable %U
- Now you need to change this line with
Exec=/usr/bin/google-chrome-stable -no-sandbox
- Save the file. And you are good to go.
This is it guys, hope this post helps you.
Now, you can help us. And you don't have to pay or anything like that. All you have to do is like us and share us on social media. There is Facebook widget on the top right of the page, sitting there and waiting for you to click. Just hit that like button and also share us.
Thank you.
your solution is not working .. check this out - https://hacktohow.blogspot.com/2017/11/how-to-run-google-chrome-as-root-user.html
ReplyDeletedidnt worked
ReplyDelete