I created a .desktop
file per coding environment I have set in VSCode (PHP, Node, C, ...) and I changed the icon in order to have a visual clue of with windows are opened in the dock, but if the icon change works well when I look for the .desktop
entry in the launcher, It stays the same in the dock (and groups).
I've seen a lot of issues similar to this one, but none of the answers worked for me so far...
I'm using Ubuntu 20.04 and this is an example of one of my .desktop
files:
[Desktop Entry]
Type=Application
Name=VSCode Vue
Icon=/home/me/icons/vue.png
Exec=vscode_profile vue "%f"
Categories=Utility;TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;application/x-code-workspace;
StartupWMClass=code
(my vscode_profile
simply launch vscode with custom path for --extensions-dir
and --user-data-dir
)
.desktop file icons works in launcher
Dock icons stays the same and group
Some of the other posts that adresse a similar issue but didn't solved mine:
- 18.04 custom icon from .desktop file not populating in dock
- Show desktop icon in Ubuntu 17.10 dock
- Synchronise icons between .desktop and dock
- What does the StartupWMClass field of a .desktop file represent?
- Icon in Unity launcher (14.04)
- What does the StartupWMClass field of a .desktop file represent?