Wrong name of .desktop file
- [x] I have searched open and closed issues for duplicates
- [x] I am using Signal-Desktop as provided by the Signal team, not a 3rd-party package.
Bug Description
The intention of f79069455932397105e025ef9bc04e74a9e6f612 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 https://github.com/signalapp/Signal-Desktop/issues/5975#issuecomment-1249159599 (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 https://github.com/signalapp/Signal-Desktop/issues/3387#issuecomment-561207912 (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
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
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.
@mkurz is this an issue with official distribution, or with an unofficial snap package?
@indutny-signal This is a problem with the official distribution.
- Download: https://updates.signal.org/desktop/apt/pool/s/signal-desktop/signal-desktop_7.11.0_amd64.deb
- Extract it and look into
data.tar.xz - Problem 1: It contains
/usr/share/applications/signal-desktop.desktop. This is wrong, correct file name would be/usr/share/applications/signal.desktop - Problem 2: Also not just the file name is wrong, but inside the desktop file
StartupWMClass=Signalshould beStartupWMClass=signal(lower case)
The same is going on for the beta package:
- Download latest beta: https://updates.signal.org/desktop/apt/pool/s/signal-desktop-beta/signal-desktop-beta_7.12.0-beta.3_amd64.deb
- Extract it and look into
data.tar.xz - Problem 1: It contains
/usr/share/applications/signal-desktop-beta.desktop. This is wrong, correct file name would be/usr/share/applications/signalbeta.desktop - Problem 2: Also not just the file name is wrong, but inside the desktop file
StartupWMClass=Signal Betashould beStartupWMClass=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:
[email protected]_app_id("signal")
For the beta you will see something like:
[email protected]_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:
- https://aur.archlinux.org/packages/signal-desktop-beta?O=20#comment-976953
- https://aur.archlinux.org/packages/signal-desktop-beta?O=20#comment-976954
- https://aur.archlinux.org/packages/signal-desktop-beta?O=20#comment-977014
@indutny-signal so what do you think?
A workaround until this is fixed is:
mkdir -p ~/.local/share/applications
sudo cp /usr/share/applications/signal-desktop.desktop ~/.local/share/applications/signal.desktop
sudo chown $USER:$USER ~/.local/share/applications/signal.desktop
update-desktop-database ~/.local/share/applications/
The initial description is rather verbose. Not sure if the dash can cause any sort of problem. I just found this because on plasma/wayland the title-bar and window switching icon is wrong.
Which all boils down to the appid being "signal" while the desktop-file is "signal-desktop", which means kde can not find a desktop file and not assign an icon.
And from the looks, many other came here for the icon as well.
So can we please have that appid aligned with the desktop-file name, whichever way.
https://github.com/signalapp/Signal-Desktop/issues/6122
@ayumi-signal
The initial description is rather verbose. Not sure if the dash can cause any sort of problem. I
If you follow the links in the verbose initial description, you'll figure out that dashes caused problems in the past. I'm not sure if they still cause problems, but if this is fixed, I suggest simply avoiding the dash to rule out any kind of further trouble.
The initial description is rather verbose. Not sure if the dash can cause any sort of problem. I
If you follow the links in the verbose initial description, you'll figure out that dashes caused problems in the past. I'm not sure if they still cause problems, but if this is fixed, I suggest simply avoiding the dash to rule out any kind of further trouble.
Did not mean to offend and did not read everything linked. I came here because of the broken icon on wayland/plasma and should rather comment in https://github.com/signalapp/Signal-Desktop/issues/6122