signalapp / Signal-Desktop

A private messenger for Windows, macOS, and Linux.
https://signal.org/download
GNU Affero General Public License v3.0
14.55k stars 2.64k forks source link

App icon not shown on GNOME under Wayland #6868

Closed haileys closed 5 months ago

haileys commented 5 months ago

Using a supported version?

Overall summary

Instead the generic icon is shown:

image

This is because Signal does not set an app ID when running under Wayland (screenshot from GNOME's built-in Looking Glass tool):

image

Steps to reproduce

  1. run Signal under Wayland with --ozone-platform=wayland
  2. observe generic application icon in GNOME app switcher

Expected result

  1. Signal icon is used as application icon in GNOME app switcher

Actual result

  1. Generic 'unknown' icon is used as application icon in GNOME app switcher

Screenshots

No response

Signal version

7.60

Operating system

Arch Linux, GNOME 46, Mutter 46

Version of Signal on your phone

No response

Link to debug log

No response

haileys commented 5 months ago

This is not a duplicate of https://github.com/signalapp/Signal-Desktop/issues/6122

StartupWMClass is set to Signal as the linked issue suggests as a workaround, and the generic app icon is still used.

$ grep StartupWMClass /usr/share/applications/signal-desktop.desktop
StartupWMClass=Signal
yochaigal commented 5 months ago

I can confirm that I have this issue in Wayland/GNOME as well (Ubuntu 24.04). Changing the wmclass to signal (lowercase) resolved the issue for me.

I set my local .desktop file to:

[Desktop Entry]
Name=Signal
Exec=/opt/Signal/signal-desktop --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WaylandWindowDecorations --no-sandbox %U
Terminal=false
Type=Application
Icon=signal-desktop
StartupWMClass=signal
Comment=Private messaging from your desktop
MimeType=x-scheme-handler/sgnl;x-scheme-handler/signalcaptcha;
Categories=Network;InstantMessaging;Chat;
haileys commented 5 months ago

@yochaigal That does indeed fix it for me. Running signal-deskop with WAYLAND_DEBUG=1 shows:

[2279573.109]  -> xdg_surface@39.get_toplevel(new id xdg_toplevel@40)
[2279573.114]  -> xdg_toplevel@40.set_app_id("signal")
[2279573.118]  -> xdg_toplevel@40.set_title("Signal")

I'll send a patch upstream to the Arch Linux package changing StartupWMClass