[snap] No separate icon/window tracking for app launchers

Bug #1891649 reported by Aljoscha Vollmerhaus
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

I've created a custom chromium launcher for an internal website, starting chromium in --app mode.
The launcher should get it's own Gnome dash icon.

To match the created windows to the dash icon, I've taken the following measures:
- include "StartupWMClass=myfoo" in the myfoo.desktop file
- gave chromium the "--class=myfoo" parameter to make it set it's WM_CLASS to myfoo

I've verified the WM_CLASS to be properly set to myfoo using xprop.
However, this does not work when chromium is launched via snap.
All windows get attributed to the chromium dash icon no matter what their WM_CLASS is.

Bypassing snap and launching chromium via /snap/chromium/current/usr/lib/chromium-browser/chrome fixes the problem.

Here are the full chromium exec lines:
Broken:
Exec=chromium --class=myfoo --no-first-run --app=https://internal.example.com/
Working:
Exec=/snap/chromium/current/usr/lib/chromium-browser/chrome --class=myfoo --no-first-run --app=https://internal.example.com/

This is on a fully patched 20.04 system.

Tags: snap
description: updated
Olivier Tilloy (osomon)
tags: added: snap
Olivier Tilloy (osomon)
Changed in chromium-browser (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
summary: - [snap] Gnome dash window tracking is broken when using chromium snap
+ [snap] No separate icon/window tracking for app launchers
Revision history for this message
Eduardo Beltran (ebf-beltran) wrote :

Possibly related.

To handle Spotify GUI size I created a custom spotify.desktop for my user in order to scale the GUI for high DPI monitor and the Application is duplicated in the launcher.

The WM_CLASS is correctly configured, I just copied the original .desktop file and modified the 'Exec' line. Also verified value using `xprop WM_CLASS` command.

Even though both files match with Application name and WM_CLASS the snap's version is always present. Is not an issue as I just favorite my version... previously when installing Spotify from a .deb file this worked flawlessly.

Might be an issue in when the a snap '.desktop' are imported vs traditional imports.

Revision history for this message
Cornelius (7-cornelius) wrote :

I have the same problem.

The workaround using "/snap/chromium/current/usr/lib/chromium-browser/chrome" would link to the correct dash icon. But the app-chromium uses the profile path ~/.config/chromium/Default in this case instead ~/snap/chromium/common/chromium/Default. And when I open a link in the app-chromium it opens a new window in the same profile and a new dash icon (WM_CLASS chromium-browser instead of chromium). Hence this is no useable workaround for me.

Parameter --profile-directory also does not work - seems like chromium do not want to start a second process with the same profile.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.