Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong name of .desktop file #6239

Open
2 tasks done
real-or-random opened this issue Jan 8, 2023 · 5 comments
Open
2 tasks done

Wrong name of .desktop file #6239

real-or-random opened this issue Jan 8, 2023 · 5 comments
Labels

Comments

@real-or-random
Copy link
Contributor

real-or-random commented Jan 8, 2023

  • I have searched open and closed issues for duplicates
  • I am using Signal-Desktop as provided by the Signal team, not a 3rd-party package.

Bug Description

The intention of f790694 was to change the name of the desktop file to signal.desktop (because the dash in the previous name signal-desktop.desktop causes issues with mime registrations (#3602).

However, the new file is apparently not effective in the official Debian packages: When one downloads and inspects https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_6.1.0_amd64.deb, the .desktop file in this package has name signal-desktop.desktop. This is an issue not only for Debian users. Also other distros use the .deb as a basis for their packages, e.g., an Arch Linux AUR package or a NixOS package.

This has been discovered in #5975 (comment) (which has correctly been closed because the original problem described in this issue has been resolved.)

Besides the dash being a risk due to #3602, this leads to issues on wayland where the window manager can't track windows properly. Ideally, X's WM_CLASS, wayland's app-id and the desktop file name should be the same.

One example of an issue is that the badge count stopped working for some users. This has been reported in #3387 (comment) (and as a comment to the commit itself) but the comment has been disregarded. Moreover, it has been reported in #4982 but this has been wrongly closed as a feature request. (It is not a feature request but a regression: apparently the badge count has worked before for the affected users.)

Steps to Reproduce

Operating System:

Linux

@FiSHYsolutions
Copy link

this is still an issue (using snap with xubuntu 22.04.3 lts):

bash:/var/lib/snapd/desktop/applications$ snap info signal-desktop | egrep 'stable|refresh|installed'
tracking:     latest/stable
refresh-date: heute um 23:06 CET
  latest/stable:    6.38.0 2023-11-14 (549) 181MB -
installed:          6.38.0            (549) 181MB -
bash:/var/lib/snapd/desktop/applications$ ls -l *signal*
-rwxr-xr-x 1 root root 470 Nov 15 23:06 signal-desktop_signal-desktop.desktop
bash:/var/lib/snapd/desktop/applications$ signal-desktop
.
.
.
Error org.freedesktop.DBus.Error.Failed: cannot find desktop file "/var/lib/snapd/desktop/applications/signal-desktop_signal.desktop"
Error org.freedesktop.DBus.Error.Failed: cannot find desktop file "/var/lib/snapd/desktop/applications/signal-desktop_signal.desktop"
.
.
.
bash:/var/lib/snapd/desktop/applications$ ls -l /var/lib/snapd/desktop/applications/signal-desktop_signal.desktop
ls: Zugriff auf '/var/lib/snapd/desktop/applications/signal-desktop_signal.desktop' nicht möglich: Datei oder Verzeichnis nicht gefunden
bash:/var/lib/snapd/desktop/applications$ echo $?
2

@mkurz
Copy link

mkurz commented Jun 6, 2024

This still is not resolved.

Ideally, X's WM_CLASS, wayland's app-id and the desktop file name should be the same.

This is it. This three need to match than it should work.

@indutny-signal
Copy link
Contributor

@mkurz is this an issue with official distribution, or with an unofficial snap package?

@mkurz
Copy link

mkurz commented Jun 6, 2024

@indutny-signal This is a problem with the official distribution.

  1. Download: https://updates.signal.org/desktop/apt/pool/s/signal-desktop/signal-desktop_7.11.0_amd64.deb
  2. Extract it and look into data.tar.xz
  3. Problem 1: It contains /usr/share/applications/signal-desktop.desktop. This is wrong, correct file name would be /usr/share/applications/signal.desktop
  4. Problem 2: Also not just the file name is wrong, but inside the desktop file StartupWMClass=Signal should be StartupWMClass=signal (lower case)

The same is going on for the beta package:

  1. Download latest beta: https://updates.signal.org/desktop/apt/pool/s/signal-desktop-beta/signal-desktop-beta_7.12.0-beta.3_amd64.deb
  2. Extract it and look into data.tar.xz
  3. Problem 1: It contains /usr/share/applications/signal-desktop-beta.desktop. This is wrong, correct file name would be /usr/share/applications/signalbeta.desktop
  4. Problem 2: Also not just the file name is wrong, but inside the desktop file StartupWMClass=Signal Beta should be StartupWMClass=signalbeta (lower case and one word)

How do you find out app_id under wayland?
Run:

WAYLAND_DEBUG=1 signal-desktop-beta --ozone-platform-hint=wayland

and look for: set_app_id.

For the stable release you will see something like:

xdg_toplevel@40.set_app_id("signal")

For the beta you will see something like:

xdg_toplevel@44.set_app_id("signalbeta")

When using KDE/kwin you can also try qdbus org.kde.KWin /KWin queryWindowInfo and click on the signal window. You will the

...
desktopFile:
...

is empty which is not so good. Only after you correctly renamed the desktop files and set the StartupWMClass correctly the desktopFile: will show the correct value.

Do you need more proof?
Go ahead and run Signal in KDE / Plasma natively under Wayland (instead of XWayland which is the default in a Wayland session):

signal-desktop-beta --ozone-platform-hint=wayland

You will see the title bar icon is incorrect, here is a screenshot: https://gist.githubusercontent.com/mkurz/f9ee4ba8487dbd075b3350dc7b71680d/raw/af1c75e80067844393da5c4070939f6d8fb1ccb3/signal-desktop-beta-screenshots.png
Again, only after you renamed the files correctly, the correct icon will also be shown when running signal (beta) natively under wayland.

You want more details? See my comments in arch linux:

@mkurz
Copy link

mkurz commented Jun 10, 2024

@indutny-signal so what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

5 participants