Chromium (Snap) on Ubuntu 20.04 - Some webapp shortcuts not working - workaround

Solution 1:

So from the big story above:

Try to launch Chromium from the console ($ /snap/chromium/1123/usr/lib/chromium-browser/chrome) and see if you can create working webapp shortcuts then. In my case, this fixed everything. If not, at least the console will hopefully give you a hint on what's going on.

Edit: apparently it's a big hit-and-miss game, as per this bug: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1732482

Please indicate on Launchpad that you're affected by this bug to increase the heat and hopefully have it fixed faster.

Solution 2:

Ok, I got this working by editing the file on the desktop to change the Exec line to start to read like this:

Exec=/snap/bin/chromium

Followed by the rest of the parameters.

I fixed the icon by searching for it on the filesystem using a simple brute force:

find . | grep ddiddklncfgbfaaahngklemobghhjkim

Where ddiddklncfgbfaaahngklemobghhjkim is the app id from the desktop file. I found a bunch of icons in /home/$USER/./snap/chromium/common/chromium/Default/Extensions/ddiddklncfgbfaaahngklemobghhjkim/2020.8.12.59739_0/icons so I picked a good looking one and changed the Icon line in the .desktop file to use that. Mine looks like this now:

Icon=/home/rock64/snap/chromium/common/chromium/Default/Extensions/ddiddklncfgbfaaahngklemobghhjkim/2020.8.12.59739_0/icons/256.png

I then saved the file, making sure no additional spurious lines had been added. The first line of the file should read:

[Desktop Entry]

I then right clicked the desktop file on the desktop and chose "Allow Launching". I now have a working launcher.