2

I have installed google-chrome-stable by using google-chrome-stable_current_amd64.deb on my ubuntu 14.04. I am able to start the browser by typing google-chrome-stable in my terminal. My issue is how do I launch chrome from docky.

I am able to add a link to chrome in my taskbar and when I click on this launcher icon another chrome-google-chrome icon gets added to the launcher as shown below :

chrome starter

and now I go to the docky, right click on the chrome icon and select 'Pin to dock'. after this I close my browser. Now I try to relaunch the chrome by selecting the pinned google-chrome icon as shown below:

chrome icon in docky

but the chrome does not launch from here. I also tried dragging the 'Google Chrome' icon to docky but it doesnt get pinned to the dock.

Any suggestions ?

7
  • Yes, I get the same problem sometimes. What I did was locked the new one to docky and it stopped opening twice. The other suggestion is to remove all icons and kill all the chrome processes (do pkill chrome). Then open it from the dash, by searching and lock that ne in.
    – Tim
    Aug 6, 2014 at 7:34
  • @Tim can you please explain what do you mean by lock the new one to the docky.
    – Swaroop
    Aug 6, 2014 at 8:01
  • So you click on the one already pinned, and another opens? Pin that to the dock.
    – Tim
    Aug 6, 2014 at 8:02
  • @Tim I did exactly that, I already have one chrome icon which is locked to my launcher, ( which I am not able to add to the docky ) and when I click this in my launcher I chrome opens with a new icon, and this icon appears both in the launcher and the docky. Now when I right click on this new icon in the docky and select pin to dock, it is getting pinned. But next time when I try to launch it directly by clicking the chrome icon in docky, nothing happens !!! Let me know if I am missing something
    – Swaroop
    Aug 6, 2014 at 8:19
  • @Tim That "other" suggestion you mentioned did the trick! Thanks! Those fuzzy icons were getting annoying.
    – user311982
    Jan 3, 2015 at 21:07

3 Answers 3

5

Finally I have figured out the problem and here is what I did :

Step 1 : Uninstall Google Chrome

Type the following in your terminal

sudo apt-get remove google-chrome-stable

Step 2 : Remove all chrome links

This was necessary because in my system, because Google Chrome icons were still present in spite of removing Chrome after Step 1.

sudo su
cd .local/share/applications
ls -l

I found that google-chrome-stable.desktop is still present here so I removed it by typing

rm -f -r google-chrome-stable.desktop

Step 3 : Reinstall Google Chrome

Download the latest google-chrome-stable_current_amd64.deb file (from here), and install it using Ubuntu Software Center.

Step 4 : Post Installation settings (Most Important)

Navigate to /usr/share/applications directory using GUI, then drag and drop the Google Chrome icon into the docky.

Thats it... Now you can launch Google Chrome from docky with just a single icon.

1
  • 7
    Sometimes all you need is Step 4 only. Aug 27, 2014 at 5:50
3

Here is another solution without re-installing, because that did not work in my case:

  1. Open /usr/share/applications/google-chrome.desktop with sudo privileges in some editor.

  2. Open Chromium or Chrome browser. It does not matter, if it shows in a different icon or not.

  3. Open a terminal and type:

    xprop | grep WM_CLASS
    
  4. Your mouse pointer will change into a cross. With this cross click anywhere inside the Chrome/ium window. Something like this will show up in the terminal:

    WM_CLASS(STRING) = "Google-chrome-stable", "Google-chrome-stable"
    
  5. In the editor, in which you opened the *.desktop file, write on the second line (after the [Desktop Entry]):

    StartupWMClass=Google-chrome-stable
    

    or StartupWMClass=whatever-was-in-the-terminal-output (in either of the quotes).

  6. Save the file and the result should be seen immediately.

1

The currently approved answer was solved only the pinning issue, but the ugly duplicated icon remained there.

  1. Edit the desktop config file:

    sudo gedit /usr/share/applications/google-chrome.desktop
    
  2. Insert the following code after the 3 group entries ([Desktop Entry], [NewWindow Shortcut Group], [NewIncognito Shortcut Group]):

    StartupWMClass=Google-chrome-stable
    
  3. In case of Docky, stop Docky, remove the cache folder and restart Docky:

    ~/.cache/docky
    
  4. If still have a problem look into the ~/.local/share/applications folder and remove every google-chrome-stable.desktop files.

Honestly this is a temporary solution, almost every Chrome update will reset the settings.

I've found the solution on the following blog entry: Fix double google chrome icon in docky and plank

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .