After installing Ubuntu on the laptop, I installed Chrome according to the tutorial of http://jingyan.baidu.com/article/335530da98061b19cb41c31d.html, but I encountered some big pits:
At first I solved the first problem with this post, but the second problem is still puzzled. . .
Later, I learned from the Documentation on Unity Launcher in the Ubuntu official website that the programs displayed by the Unity launcher are in the /usr/share/applications/ and ~/.local/share/applications/ directories. Desktop files are determined, and the configuration in the ~/.local/share/applications/ directory is read first.
The problem lies in the last step of the Baidu experience:
Finally, if all goes well, execute the following command in the terminal:
/usr/bin/google-chrome-stable
The Google Chrome browser will start, and its icon will appear on the Launcher on the left side of the screen. Right-click on the icon-"Lock to Launcher", and you can simply click to start it later.
After launching Chrome with this command and locking it into the launcher, the program creates the google-chrome.desktop file in ~/.local/share/applications/. This file only has the option to start /usr/bin/google-chrome-stable.
When Chrome becomes the default browser, when other programs call Chrome to open the link, the parameter that represents the link to be opened is not passed to the /usr/bin/google-chrome-stable program, so after clicking the link, it opens A blank Chrome window.
I found the problem, I directly deleted ~/.local/share/applications/google-chrome.desktop. At this time, the icon on the launcher disappeared. I found the Chrome icon in the search box and dragged it to the launcher, and it finally returned to normal.
Therefore, to add the Chrome browser to the launcher, just like installing other programs, directly find the corresponding program in the search and drag it to the sidebar after installation.
I don’t know how many people will continue to be pitted by the tutorial╮(╯_╰)╭
Recommended Posts