Ubuntu adds the Chrome icon to the correct posture of the launcher

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:

  1. After setting Chrome as the default browser, no matter what link is clicked, it just opens a blank new tab page
  2. After the launcher icon is right-clicked, there is only "New Tab Page-Google Chrome" option. There is no option to create a new window or create an incognito window. It is also very problematic to click the icon on the launcher to switch windows.

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

Ubuntu adds the Chrome icon to the correct posture of the launcher
Explain the solution to the Ubuntu 16.04 launcher icon exception
The road to reinstallation of ubuntu 18.04 from scratch
Introduction to the use of Hanlp in ubuntu
How to turn the language of Ubuntu into Chinese? ?
Solution to the slow speed of ubuntu18.04 wireless network
Centos7 to install the correct posture of Tomcat8 and set the boot self-start practice notes
Centos7 activemq startup failure to solve the correct posture practice notes
The processing of the ubuntu snapd process continuously writing to the hard disk
Ubuntu basic settings: introduction to the installation and use of openssh-server
How to extend the root directory of LVM under Ubuntu system
How to fix the problem of missing system settings on Ubuntu 14.04
Overview of the Ubuntu file system
Ubuntu adds desktop icons to scripts
How to expand the ubuntu LVM partition of a VirtualBox virtual machine
ubuntu16.04 method steps to upgrade the kernel
The apt-get command of Ubuntu basic tutorial
The implementation of the Ubuntu18.04 installation Pycharm tutorial
Ubuntu modified the default sh to bash
How to modify the hostname on Ubuntu 20.04