The Google Chrome browser cannot be run as the root user in Ubuntu

Source: Internet
Author: User
Google Chrome is preferred. After Chrome is installed on Ubuntu, the following prompt is displayed. I am used to using Google Chrome as a root user and do not want to switch. Tip: start Google Chrome as a normal user. If you have run Google Chrome as the root user, you need to change the ownership of your profile directory. Solution 1: #: xhost + # sudo-I-usophie/opt/google

Google Chrome is preferred. After Chrome is installed on Ubuntu, the following prompt is displayed. I am used to using Google Chrome as a root user and do not want to switch.

Tip: start Google Chrome as a common user. If you have run Google Chrome as the root user, you need to change the ownership of your profile directory.

Solution 1:

#: Xhost +

# Sudo-I-u sophie/opt/google/chrome/google-chrome

The command is generally used to run chrome with sophie, but it is troublesome to open chrome before running it.

Note: before the first command, there must be no less

Solution 2:

Right-click chrome's shortcut icon, click Properties, modify command properties, and change:

/Opt/google/chrome/google-chrome % U -- user-data-dir =/root/chrome

Add the following -- user-data-dir =/root/chrome to specify the working directory. Here, the user's usage data will be stored, which will involve privacy issues.

Note: Some need to add/opt/google/chrome/google-chrome % U-user-data-dir,

Or/opt/google/chrome/google-chrome-user-data-dir = "/root/. config/google-chrome"

Solution 3:

Online access method, edit/usr/share/applications/google-chrome.desktop file, find the Exec line, change the value to/opt/google/chrome/google-chrome-user-data-dir = "/root /. config/google-chrome "should also work.

Note: I did not test, because in this application directory can not find the google-chrome.desktop file, the specific reason is unknown, may not write the reason, currently solution 2 to solve the problem, no problem.

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.