Garten Eden

#linux #programming #android #online #stuff

Problems with Chrome Icon in Docky

Since an update of Docky or Google Chrome the browser’s icon was not high resolution and sharp anymore but low-res and ugly (maybe a stretched 16x16 pixmap). Besides, though the browser started after clicking at its stored icon at the dock, it was not matched in terms of activated but a new icon was created, the low-resolution one.

Configuring Dockys Window Matching

After some research I found out that one is able to configure Docky’s window matching behavior.
It can look for an applications WM_CLASS, so we just have to determine Chromes one. To do so, I entered the following command in the terminal and clicked on an open Chrome window.

xprop | grep WM_CLASS | awk {print $4}

It echoed "Google-chrome-stable".

Understanding Docky

At its start, Docky tries to read out all application launchers (e.g. in /usr/share/applications/) and safes them in a cache file.
Thus we have to edit Chrome’s launchers so they contain its WM_CLASS and Docky is able to recognize it.

locate-ing all Chrome launchers ("google-chrome.desktop"), I got two files which I extended with StartupWMClass=Google-chrome-stable.

In order to reload all launchers, I quit Docky, deleted its cache file in ~/.cache/docky/ and restarted it. Voilà, a nice full-resolution Chrome icon.

Seems like you have to update Dockys cache file as well. In order to achieve that, insert the line mentioned above in ~/.cache/docky/.

Updated 14.01.2014 08:22 p.m.


Your comment:

So far...

31 Oct, 2016 07:29 am Muhammad Akif Ateef says:
Really helpful! (Y)
23 Jun, 2014 11:49 am Maik says:
Thank you!
18 Feb, 2014 09:28 am Royce Lithgo says:
Thanks for the fix. I just noticed the issue today. Not sure when the Chrome update went through. Annoying as hell that we need to do this for every Chrome update.
07 Feb, 2014 04:05 pm Eduard Dopler says:
1. Get the WM_CLASS of your Chrome window via the above-mentioned Terminal line.
2. Close Chrome.
3. Search Chromes desktop file via locate google-chrome.desktop
4. Append StartupWMClass=Google-chrome-stable (or whatever string youve got from point 1.
5. Kill Docky.
6. Remove Dockys cache file.
7. Start Docky again.
04 Feb, 2014 05:18 pm Oleg says:
for noobs please....

I cant figure this out! Can you help me?
20 Jan, 2014 11:46 pm Nicolas says:
Thaaaaank you, it was really annoying. I tryied using chromium and it works, but it has some troubles with sync. !!
20 Jan, 2014 09:04 pm Ivo Acioly says:
14 Jan, 2014 08:23 pm Eduard Dopler says:
Sadly you have to do that everytime Chrome updates.


Wait a sec, loading...

Email (not published)

Homepage (optional)

Comment... (code tag allowed)