Package Details: signal-desktop-beta 7.37.0beta1-3

Git Clone URL: https://aur.archlinux.org/signal-desktop-beta.git (read-only, click to copy)
Package Base: signal-desktop-beta
Description: Signal Private Messenger for Linux - Beta version.
Upstream URL: https://signal.org
Keywords: secure-messenger signal signal-desktop
Licenses: GPL3
Conflicts: signal-desktop-beta-bin
Submitter: Edu4rdSHL
Maintainer: Edu4rdSHL
Last Packager: Edu4rdSHL
Votes: 16
Popularity: 0.37
First Submitted: 2020-08-17 19:09 (UTC)
Last Updated: 2024-12-12 17:09 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 .. 14 Next › Last »

mkurz commented on 2024-06-06 21:42 (UTC)

Question, does setting WM_CLASS=signalbeta fix the issue for you?

No, this does not fix the issue. I tried four things:

  1. StartupWMClass=signalbeta in the desktop file did NOT work.
  2. StartupWMClass=signal-desktop-beta did NOT work (I already explained that in "side note 1" in https://aur.archlinux.org/packages/signal-desktop-beta#comment-976954)
  3. Running the app from command line with WM_CLASS=signalbeta signal-desktop-beta did NOT work.
  4. Renaming the desktop file to signalbeta.desktop WORKED!!!

If you look at the code I referenced in my previous comments it's pretty clear that the desktop file needs to be renamed. For me this is 100% clear.

I will also open bug reports at - https://gitlab.archlinux.org/archlinux/packaging/packages/signal-desktop and - https://aur.archlinux.org/packages/signal-desktop-beta-bin

so they fix this as well.

Edu4rdSHL commented on 2024-06-06 21:27 (UTC)

Hey, thanks, now I understand what you're talking about. Yes, I don't have that "app icon" in the titlebar, the StartupWMClass works for the icon on the dash panel, but you're talking about something different that I didn't even know it exists.

Question, does setting WM_CLASS=signalbeta fix the issue for you?

mkurz commented on 2024-06-06 21:21 (UTC)

I think you totally misunderstand what I am talking about.

signal-desktop-beta is running great on KDE with native wayland. It works! EXCEPT the app icon in the titlebar. Here is a screenshot to show you what I am talking about: https://gist.githubusercontent.com/mkurz/f9ee4ba8487dbd075b3350dc7b71680d/raw/af1c75e80067844393da5c4070939f6d8fb1ccb3/signal-desktop-beta-screenshots.png

So you see, when using native wayland the title bar icon does not get set correctly. This is because wayland is using an app_id. Now, the app_id for signal-desktop-beta is signalbeta. The app_id has to match the desktop file. I did explain this in my previous post. So this has nothing to do with KDE or Gnome.

In Gnome, do you even have icons in the title bar? I think you do not even have this icons... Can you post a screenshot with the title bar icon running native wayland in gnome?

Now, even Gnome recommends that the desktop file name should match the app_id (or WM_CLASS in X), please see the gnome wiki: https://wiki.gnome.org/Projects/GnomeShell/ApplicationBased#The_WM_CLASS_X_Window_property:

To ensure the GNOME 3 Shell will track your application, you can also set the WM_CLASS X window property to be the same as your application's .desktop file name, without the .desktop extension (the desktop file should be lower-case). The easiest way to achieve this is to have your application's process name match the .desktop file name, and ensure you use g_option_context_parse.

Also more proof. Look at this code: https://github.com/electron/electron/blob/v32.0.0-nightly.20240605/shell/browser/native_window_views.cc#L303-L304 It calls this method: https://github.com/electron/electron/blob/v32.0.0-nightly.20240605/shell/common/platform_util_linux.cc#L410-L419

I am 100% sure the desktop file name needs to be changed for correct wayland support, no matter if using Gnome or KDE.

I hope you now understand what I am talking about. If you read my previous comments again, maybe it is more clear now.

Edu4rdSHL commented on 2024-06-06 20:32 (UTC) (edited on 2024-06-06 20:34 (UTC) by Edu4rdSHL)

Yes, natively on Wayland. I'm using Gnome.

Edit: see https://bbs.archlinux.org/viewtopic.php?id=280119 for a similar issue to what you're having, which seems to be KDE-specific.

mkurz commented on 2024-06-06 20:23 (UTC) (edited on 2024-06-06 20:24 (UTC) by mkurz)

StartupWMClass works perfectly on Wayland.

Did you test that? I mean using Wayland natively, not using XWayland. Which DE are you using?

Edu4rdSHL commented on 2024-06-06 20:04 (UTC)

@mkurz StartupWMClass works perfectly on Wayland, and that's the reason it was added some time ago in https://aur.archlinux.org/cgit/aur.git/tree/signal-desktop-beta.desktop?h=signal-desktop-beta#n9

If someone wants to run it on wayland, then it can use the required flags, if your WM/DE is not recognizing StartupWMClass it's a problem with your DE, I'm not going to change the name of the desktop file for no reasons.

mkurz commented on 2024-06-06 14:59 (UTC)

(Sidenotes to my previous comment because I exceed the comment character limit ;)

Sidenote 1: Instead of renaming the desktop file I also tried to change StartupWMClass within the desktop file to signal-desktop-beta instead, but that did not work because it seems Wayland does not read this value and gets ignored and it's only relevant if you use X11.

Sidenote 2: Instead of copy/pasting the desktop file to ~/.local/share/applications/ to add the flag --ozone-platform-hint=... to Exec I just found out that there is better approach available since Electron 28: You can set the environment variable:

ELECTRON_OZONE_PLATFORM_HINT=wayland

just like the flag! (allowed values: auto|wayland|x11) I put that env var into /etc/environment so I don't have to copy/modify desktop files anymore (btw, restart required if changing /etc/environment) Here are links:

BTW, support for the --ozone-platform-hint flag itself was added in Electron 21 already:

Sidenote 3: The reason why I know all that is because I IntelliJ is currently working on Wayland support and they did run into the same problems:

mkurz commented on 2024-06-06 14:58 (UTC)

TLDR: Please rename the file signal-desktop-beta.desktop to signalbeta.desktop for better wayland support.

diff --git a/.SRCINFO b/.SRCINFO
index 6ee559a..24572ab 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -28,7 +28,7 @@ pkgbase = signal-desktop-beta
        optdepends = xdg-desktop-portal: Screensharing with Wayland
        conflicts = signal-desktop-beta-bin
        source = signal-desktop-beta-7.12.0beta3.tar.gz::https://github.com/signalapp/Signal-Desktop/archive/v7.12.0-beta.3.tar.gz
-       source = signal-desktop-beta.desktop
+       source = signalbeta.desktop
        sha512sums = 0b0df880c641b1bee43f0fa0adfbfefcdfbb3f785eeef456a9341fae7f35b5acef45ec017a84418dc69f4f84674e7dc722f72cafeb287cc1555d163f41e82a>
        sha512sums = 5ae001faedff440776f4a62235c294454a951f4cc412665a21cd958bdf4a0223c89f741f2786d93727c7acf49a8a98d75156c6e14ba1f01da261fba373ef67>
        makedepends_aarch64 = fpm
diff --git a/PKGBUILD b/PKGBUILD
index 8a0aa3b..c924b38 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -23,7 +23,7 @@ optdepends=('xdg-desktop-portal: Screensharing with Wayland')
 makedepends_aarch64=('fpm')
 source=(
   "${pkgname}-${pkgver}.tar.gz::https://github.com/signalapp/${_pkgname}/archive/v${pkgver//beta*}-beta.${pkgver##*beta}.tar.gz"
-  "${pkgname}.desktop"
+  "signalbeta.desktop"
   )
 sha512sums=('0b0df880c641b1bee43f0fa0adfbfefcdfbb3f785eeef456a9341fae7f35b5acef45ec017a84418dc69f4f84674e7dc722f72cafeb287cc1555d163f41e82a06'
             '5ae001faedff440776f4a62235c294454a951f4cc412665a21cd958bdf4a0223c89f741f2786d93727c7acf49a8a98d75156c6e14ba1f01da261fba373ef675a')
@@ -73,7 +73,7 @@ package() {

   chmod u+s "${pkgdir}/usr/lib/${pkgname}/chrome-sandbox"

-  install -Dm 644 "../${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
+  install -Dm 644 "../signalbeta.desktop" -t "${pkgdir}/usr/share/applications"
   for i in 16 24 32 48 64 128 256 512 1024; do
     install -Dm 644 "build/icons/png/${i}x${i}.png" \
       "${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/${pkgname}.png"

Full story: I am running Wayland. Running the xlsclients command I found out that signal-desktop-beta is using XWayland and not running native in wayland :( Because signal-desktop-beta is an electron app, I want to run it natively in wayland. So what I did is copied the desktop so I can modify it:

cp /usr/share/applications/signal-desktop-beta.desktop ~/.local/share/applications/signal-desktop-beta.desktop

I added --ozone-platform-hint=auto to the command:

...
Exec=signal-desktop-beta --ozone-platform-hint=auto -- %u
...

Great! Now signal runs natively in Wayland and not using XWayland anymore. However, there is one issue: The app icon is not set correctly in the top left (the tray icon however is set correctly). Why is that? Wayland uses the concept of an app_id (which is kind of the same like WM_CLASS in X). That app_id has to match the .desktop file entry. Now, to find out what the app_id of signal-desktop-beta you can run (if you are running wayland):

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

You will then see:

...
[2107606.322]  -> xdg_toplevel@44.set_app_id("signalbeta")
...

Instead of explaning too much myself I will just post some useful links:

And now look at this, the Signal-Desktop repo itself even names the desktop file signalbeta.desktop for it's beta setup:

And even one more proof: If you are running KDE/kwin (on wayland) and start signal with the wayland flag (signal-desktop-beta --ozone-platform-hint=wayland) you can run following and click on the signal window to display more insights:

$ qdbus org.kde.KWin /KWin queryWindowInfo
...
desktopFile: signalbeta
...

As you can see even here it says the desktop file expected would be signalbeta[.desktop] (this hint was taken from https://askubuntu.com/questions/367396/what-does-the-startupwmclass-field-of-a-desktop-file-represent/1461720#1461720).

Just-Punk commented on 2024-06-04 20:53 (UTC)

@mkurz thank you. It's been finally built & installed.

mkurz commented on 2024-06-04 11:44 (UTC)

OK, found the problem: https://github.com/signalapp/Signal-Desktop/pull/6898

Just wait for the next beta ;)