Как без проблем установить Google Chrome на Fedora?

1359
Hayden Schiff

Я хотел бы установить Google Chrome на Fedora. Но я не смог заставить файл, загруженный с веб-сайта Google, работать, и в нем слишком много запутанной, а иногда и противоречивой информации о том, как установить его из командной строки. Каков окончательный ответ, чтобы легко установить Chrome на Fedora 22?

0

1 ответ на вопрос

0
Hayden Schiff

Here is a series of commands you can run on Fedora to install Google Chrome in one swell foop. Just copy these 10 lines, open Terminal, and paste them in (Ctrl+V won't work; right-click and hit Paste, or middle-click):

cat << EOF | sudo tee /etc/yum.repos.d/google-chrome.repo [google-chrome] name=google-chrome - \$basearch 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 EOF sudo yum install google-chrome-stable sudo sed -i.bak '/\[Desktop Entry\]/a StartupWMClass=Google-chrome-stable' /usr/share/applications/google-chrome.desktop 

To make these updates kick in immediately, press Alt+F2 and type r to make GNOME restart. (otherwise, GNOME will probably update on its own in short time, or the next time you restart your PC)

These commands have only been tested on Fedora 22, but they should theoretically work on past or future versions of Fedora as well. They might even work on other OSes that use RPM.


If you're curious, here's what's going on here. The first 8 lines add the official Google Chrome repository to Yum's list of repositories. The 9th line then installs Google Chrome using Yum. The last line edits Chrome's .desktop file (which is the file that adds Google Chrome to your application launcher) to fix an issue where Chrome would launch as "Google-chrome-stable" and you'd have two different icons in your dock and it just looked silly.

All of this info was originally posted here on GitHub Gist.