Cinnamon: Chrome Web Apps don't show the app icon in the panel.

Created on 11 Dec 2016  路  16Comments  路  Source: linuxmint/cinnamon

The Web Apps from Chrome dont show their respective icon in the panel. They all show the same default chrome icon, as you can see in the images attached.
screenshot
systeminfo

BUG

All 16 comments

I just tried this with Sheets and Weatherbug and both worked fine on 3.2.

I'd like to get confirmation from someone else as to weather or not this works for them. As I said, it works fine here on 18/Cinnamon master.

I found out that if you create the webapp shortcut it works perfectly, but the webapps you already have in your google account before installing Chrome don't work.

What I have to do if I want webapp icon showing in panel is to remove existing webapps and than adding all again.

:(

@JosephMcc I've just downloaded Google Docs and it shows the Chromium icon, not its own. I'm on 3.2.1.

I'm on Mint 18.1 and they do show the app icons. It didn't show for me prior to 18.1. Cheers!

I'm in Mint 18.1 too. It only shows the app icons if I create the shortcut already in Mint. The apps I had previous in Chrome show the Chrome icon.

I than delete all my webapps shortcuts and created it all again. It works now, but is frustrating anyway.

The menu also does not show Epiphany webapps.
Is this a separate bug?

I still have this problem in Linux Mint 19.1 but not consistently. Here's a screenshot of google calendar having the correct icon but gmail having the generic chrome icon. I compared the corresponding manifest.json files and could find nothing of notable difference that might explain the icon.

screenshot from 2018-12-21 08-16-57-chrome-icons

@rics, is this still an issue in Cinnamon 4.4?

@rics, is this still an issue in Cinnamon 4.4?

Can't tell... Not using it anymore...

Still an issue on Cinnamon 4.6.7

I can reproduce this.

  • go to chrome://apps, right-click an app, create shortcut.
  • close any existing chrome instances, launch the app, the chrome icon is used in the window list instead of the app's icon.

If I open the desktop file chrome created (in ~/.local/share/applications - prefixed with chrome-), I have:

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Entanglement Web App
Exec=/usr/lib/chromium/chromium --profile-directory=Default --app-id=aciahcmjmecflokailenpkdchphgkefd
Icon=chrome-aciahcmjmecflokailenpkdchphgkefd-Default
StartupWMClass=crx_aciahcmjmecflokailenpkdchphgkefd

The StartupWMClass is used to tell Cinnamon (or any desktop) to expect a window with that wm class - this allows the window to be identified easily (especially when the .desktop file name has no relation to the program it's running).

The problem is that the Exec line is never telling chromium to use that wm class (run xprop and click on a window to see this sort of info, like wm class).

If I modify the Exec line to:

Exec=/usr/lib/chromium/chromium --profile-directory=Default --app-id=aciahcmjmecflokailenpkdchphgkefd --class=crx_aciahcmjmecflokailenpkdchphgkefd

then when we try to launch the app again, the icon is now correct, because Cinnamon is able to match the class with the desktop file's StartupWMClass (again, you can run xprop and click the chromium window to see the class being set).

There's another problem, though: If you launch your app, and then later launch a normal chrome browser window, it will also end up with that app's icon. I haven't figured out a way around this yet - even if I create a new profile and make the app shortcut using it, chromium doesn't appear willing to launch a separate process for that profile, so the icon issue remains.

tldr;
This is a mess, mostly with chromium, and can only be partially fixed by manually editing the generated desktop files.

In my case, it's not a chrome web app, but an extension (still a web app, but .desktop files are not involved.)

That's probably even more useless (no desktop file to match).

I've got an idea I'm trying out, it may let us at least get the correct icon for a window.

I was able to fix chrome showing the correct icon for extensions that create windows (like LINE): https://github.com/linuxmint/cinnamon/commit/2b269f9c460b8079d9eb5d1ed989d9c276e60128.

The drawback is that the icon will not be a hi-res icon you typically get on the panel. Since these windows lack any associated .desktop file, they can't specify an icon name. Instead, they attach a limited set of the icon images themselves that we can get from the window. Still, it's better than using the browser icon.

This may assist in other situations I haven't envisioned.

Chromium doesn't construct valid desktop files for its web apps (the ones you can add shortcuts from chrome://apps) - and even then it doesn't respect its own command line switches. This trouble is shared with chromium-based browsers. Using a unique profile (as opposed to using the user's default) improves the experience somewhat (this is an option in our new WebApp Manager, I'm not sure about other utilities that create these).

I've been looking into the chromium source and may try to address or at least raise discussion there about these issues but I don't have time at the moment.

Was this page helpful?
0 / 5 - 0 ratings