centos8.3 google-chrome 安装与启动

1. 安装

1.1 新建一文件

  vi /etc/yum.repos.d/google-chrome.repo

 [google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch
enabled=1
gpgcheck=1  
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub 

1.2.  下载google-chrome-stable_current_x86_64.rpm

1.3  dnf  -y localinstall google-chrome-stable_current_x86_64.rpm

说明:在安装过程中还会出现一些问题,按问题提示解决即可。

二、启动

安装完成后,找到应用图标或输入命令,却不能启动,解决办法是编辑桌面文件,删除那些没用的。

gedit /usr/share/applications/google-chrome.desktop

[Desktop Entry]
Version=1.0
Name=Google Chrome
# Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.
GenericName=Web Browser

# Gnome and KDE 3 uses Comment.
Comment=Access the Internet

Exec=/usr/bin/google-chrome-stable %U --no-sandbox
StartupNotify=true
Terminal=false
Icon=google-chrome
Type=Application
Categories=Network;WebBrowser;
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/ftp;x-scheme-handler/http;x-scheme-handler/https;
Actions=new-window;new-private-window;

[Desktop Action new-window]
Name=New Window

[Desktop Action new-private-window]
Name=New Incognito Window

#Exec=/usr/bin/google-chrome-stable --incognito
Exec=/usr/bin/google-chrome-stable %U --no-sandbox

按照上面文件进行配置即可从桌面图标启动谷歌浏览器了。修改的内容有哪些,读者可以自行比较。

还有一种启动谷歌浏览器的方法,在终端输入命令:

/usr/bin/google-chrome-stable --no-sandbox

猜你喜欢

转载自blog.csdn.net/tswang6503/article/details/112909079