OrangeDrangon / android-messages-desktop

Android Messages as a Cross-platform Desktop App
Other
324 stars 27 forks source link

WM_CLASS incorrect - causing application icon to be missing under Ubuntu 24 #457

Open user-8472 opened 3 weeks ago

user-8472 commented 3 weeks ago

Issue Application icon shows up incorrectly in the Ubuntu Dock at install time for version 5.4.5 installed from latest .deb package when running under Ubuntu (24.04)

To Reproduce

  1. Download package: Android-Messages-v5.4.5-linux-amd64.deb.
  2. sudo dpkg -i ./Android-Messages-v5.4.5-linux-amd64.deb
  3. Run 'Android Messages' from application launcher or execute from command line AndroidMessages --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --no-sandbox <username>
  4. Default icon for applications without an icon shown in Dock

Expected behavior Should show the Android Messages icon

Workaround Modify the applications .desktop file to look for the icon under the correct window manager class.

Inspect the running application using the xprop utility to show the WM_CLASS attribute.

$ xprop WM_CLASS
WM_CLASS(STRING) = "android-messages-desktop", "android-messages-desktop"

Update the StartupWMClass entry in /usr/share/applications/AndroidMessages.desktop sudo vim /usr/share/applications/AndroidMessages.desktop

Modify the WMClass to match the output from the xprop command StartupWMClass=android-messages-desktop

Screenshot from 2024-08-22 10-01-26

Application icon should refresh automatically after saving the file with the new changes.

Screenshots Icon appearance after initial installation Screenshot from 2024-08-22 09-56-37
Icon appearance after modifying StartupWMClass in AndroidMessages.desktop Screenshot from 2024-08-22 09-56-56

Desktop

OrangeDrangon commented 3 weeks ago

Thanks for the investigation. I will try to remember to take a look and see if I can figure out how to persist that in the build process.

Thanks Kyle

Sent with Shortwave https://www.shortwave.com?utm_medium=email&utm_content=signature&utm_source=a3lsZUBla3Jvc2VuYmVyZy5jb20=

On Thu Aug 22, 2024, 02:28 PM GMT, user-8472 @.***> wrote:

Issue Application icon shows up incorrectly in the Ubuntu Dock at install time for version 5.4.5 installed from latest .deb package when running under Ubuntu (24.04) To Reproduce

  1. Download package: Android-Messages-v5.4.5-linux-amd64.deb https://github.com/OrangeDrangon/android-messages-desktop/releases/download/v5.4.5/Android-Messages-v5.4.5-linux-amd64.deb.
  2. sudo dpkg -i ./Android-Messages-v5.4.5-linux-amd64.deb
  3. Run 'Android Messages' from application launcher or execute from command line AndroidMessages --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --no-sandbox
  4. Default icon for applications without an icon shown in Dock Expected behavior Should show the Android Messages icon Workaround Modify the applications .desktop file to look for the icon under the correct window manager class. Inspect the running application using the xprop utility to show the WM_CLASS attribute. $ xprop WM_CLASS WM_CLASS(STRING) = "android-messages-desktop", "android-messages-desktop" Update the StartupWMClass entry in /usr/share/applications/AndroidMessages.desktop sudo vim /usr/share/applications/AndroidMessages.desktop Modify the WMClass to match the output from the xprop command StartupWMClass=android-messages-desktop Screenshot.from.2024-08-22.10-01-26.png (view on web) https://github.com/user-attachments/assets/fb08416f-f834-4a24-a126-80729cdd5956 Application icon should refresh automatically after saving the file with the new changes. Screenshots Icon appearance after initial installation Screenshot.from.2024-08-22.09-56-37.png (view on web) https://github.com/user-attachments/assets/d3146e7d-77ec-47e1-96c3-45a5d1b6f1ab Icon appearance after modifying StartupWMClass in AndroidMessages.desktop Screenshot.from.2024-08-22.09-56-56.png (view on web) https://github.com/user-attachments/assets/f57e9b90-0d79-4397-aa71-ae973e391e9d Desktop