-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Support Wayland natively #3411
Comments
Are you able to get Slack to work under Wayland? (basically, do other Electron apps support your scenario?) |
@scottnonnenberg I do not use Slack and I don't think I have any other Electron app. So maybe the feature needs to be added there first but I have no idea. |
It was already discussed here: electron/electron#9056 |
I'd love to see this happen too. I'm trying to push people close to me to use something secure for IM, but the fact that Signal doesn't work on Wayland is a huge blocker (especially since it means a super blurry app on hidpi displays). |
There is progress on getting Wayland support into Electron: electron/electron#10915 |
It's most likely running via xwayland. The biggest issue here, is the lack of support for scaling (which is a must on highdpi displays). You get a blurred window -- it's rendered at normal size and then stretches the same way a png would look when stretched.
… On Apr 19, 2020, at 13:37, Jan Vlug ***@***.***> wrote:
I'm a bit surprised by the statement that Signal does not work on Wayland. I'm using Fedora with GNOME Wayland and the Flathub Signal Desktop flatpak without any problems.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Quick bump on this issue - I was just last night able to get Signal Desktop running natively under Wayland. It requires a custom Electron build w/ the necessary Ozone configuration enabled, and shoehorning that custom Electron dist into Signal Desktop. If anybody is curious as to the process I used, or how I recommend repeating the process now (in hindsight), please do let me know. For the moment, it's well beyond the scope of a PR, until Electron decides to start shipping their standard builds with Ozone enabled by default... but it can be done. |
@ninefathom I would love to hear how you did it -- thanks so much for hte heads-up |
@titaniumbones The main thing is getting a build of Electron with the necessary flags going. I followed their standard build instructions here, specifically for a release Linux build. I also added patches from Arch's electron-ozone on AUR and used that as a starting point for gn build flags, since that happens to be the exact version of Electron which Signal Desktop currently needs. The patches were applied wholesale to my build tree before running gn. The flags to gn were slightly modified; here's what I ended up using (in addition to importing the release defaults):
The main difference from that AUR PKGBUILD is that component ffmpeg seems to be needed for Signal Desktop; simple trial-and-error showed that it would no run correctly without it (just stalled at a blank blue window on launch). Following that results in an Electron dist.zip which you can then shoe-horn into Signal Desktop. This has to be done in two places.
Once you've done that, and after you've made any other local changes to Signal Desktop as needed- like working around all of the pre-compiled libraries in various dependencies to get build on aarch64 working, ahem Signal Desktop folks if you're reading- you can build Signal Desktop using the normal process, et voila! You get a package that will happily run natively on Wayland, no Xwayland needed. And then you sit around wondering if the 2-3 days it took to do that was really worth it. If you're in a hurry and feeling brave, don't forget that you can skip building Signal Desktop locally... you can simply install or extract the normal, official Linux build, then unzip your custom Electron dist.zip over the top of it, and rename electron to signal-desktop. That's just part of the way Electron works; it'll happily pick up on Signal's resources/app.asar[.unpacked] and use them. I don't recommend doing this for official deployment, of course, but if you want to just test out signal-desktop on Wayland and want to cut out the second of the two steps above, it'll work. |
Quick update for the interested following this - there are now experimental
See this PR: electron/electron#26022 and the issue mentioned above |
Electron 12 is in beta, but will remain so until March. Any chance that Signal builds can use the Electron beta until them? The lack of Wayland support is a pretty big dealbreaker for adopting Signal on modern Linux desktop. |
We are unlikely to release a version of Signal Desktop that depends on a prerelease version of Electron, as we don’t want to compromise the stability of the app. But we're keeping an eye on this—thanks for flagging and keeping this issue up to date. |
This does sound weird. Prerelease versions of electron make it run natively on Linux/Wayland desktop, and fixes a large pile of bugs (including security issues, like any unprivileged application being able to inspect all the contents of what Signal renders on screen). Does this means that these bugs and security issues will remain part of signal for the next 4 months? :/ |
First of all, I too am eager for the day that most of the world uses Wayland and would love for Signal Desktop to do its part. ("on abandoning the X server" is a nice read that informs this opinion.) But we're unlikely to upgrade to a prerelease version of Electron because of the potential instability a beta might bring. We've had some issues with this in the past. Second, we're planning on upgrading from Electron v8 to Electron v11 soon. This doesn't address the issue because Wayland support seems to have landed in Electron v12, but the upgrade from 11 to 12 will be much smaller once it's out of beta. It should also address many of the bugs you alluded to. Third, could you link us to that security issue? |
Any X11 application can grab what other images are X11 applications rendering. So, a misbehaving application could potentially screengrab Signal's window and upload it elsewhere. X11 provides no mechanism to prevent this. |
@WhyNotHugo Do we have any way to prevent this, other than completely dropping X11 support? |
I don't think so. AFAIK, that's one of wayland features, with isolation frameworks (e.g.: Flatpak) it's possible on wayland. |
@EvanHahn-Signal I am happy that you are paying attention to this issue😁 It is of course totally OK to wait until Waland support becomes stable before using it in a stable Signal release👍 Maybe Signal could release wayland-support through a feature-flag before then? Example: I realize this could be hard to maintain, but could be worth exploring though, as a way to get testing feedback from early adopters. |
Thanks for the suggestion—we'll keep that in mind.
|
Great😁 FYI, I just remembered that, to play nice with Flatpak, passing the proposed feature-flag as an environment variable is the preferred option - example The reason for this is that Flatpak does not currently have a way to set extra-args permanently ref: flatpak/flatpak#2913, but one can easily set environment variables permanently per app. |
tl;dr: First stable Electron 12 release: 2021-03-02 (but the actual release date could theoretically be adjusted) Just as a quick FYI: https://www.electronjs.org/docs/tutorial/electron-timelines lists the stable release date for Electron 12 now: (Note: This isn't meant to create pressure and I understand that Signal-Desktop will likely need (a bit) longer to update to Electron 12, especially since it's still based on Electron 8.5.2 and I'm not sure how the timeline for the transition to Electron 11 currently looks like, but I'm briefly dropping the release date here so that we don't risk forgetting about it.) |
@primeos Thanks for sending. We'll keep an eye on this. I'm personally working on upgrading us to Electron 11, so hopefully the jump to 12 won't be so bad when it comes around. |
Electron 12 was just released: https://github.com/electron/electron/releases/tag/v12.0.0 |
Note, that Electron does not seem to support drawing window decorations yet. See these issues electron/electron#27522 electron/electron#27016 electron/electron#11907 |
Note that most compositors will draw window decorations server-side, so electron apps don't really need to worry about that. The only exception seems to be GNOME, which does not implement Server Side Decorations. GNOME devs have stated that they will not implement that either. GNOME users are likely used to seeing applications lacking decorations, since applications require dedicated GNOME support. In the meantime, it's safe to ship with Wayland support as-is. Things like scaling will work on all compositors, and the only bugs visible will be already-known GNOME bugs. Meanwhile, the security benefits are substantial. |
I've filed an internal issue for us to upgrade to Electron 12. To set expectations: upgrading to Electron 11, which we did recently, was arduous. This was likely more difficult because we upgraded from 8 to 11 (three major versions), but Electron upgrades can be challenging. We'll look into prioritizing this. |
The flatpak is missing wayland permissions |
@puyoxyz wrote:
That's the choice of the people building the flatpak, see flathub/org.signal.Signal#188 Please note that it is not sufficient to give wayland permissions to the signal flatpak, you still need to enable ozone using the command line.
This will change soon once the change making ozone the default (electron/electron#30814) will land in Signal when Signal rebases to this electron version. Wayland support is still incomplete, as this command line results in a signal window without decorations on GNOME shell at least. More details in the issue linked above. |
For the window decorations support, have a look at:
As a workaround, you could enable them following this comment. |
Anyone else getting segfaults recently? I am pretty sure I had signal working on wayland before, but now I get:
Running
So somewhere a nullptr exception. Running signal-desktop 5.28.0. EDIT: Ah seems related to #5719 .. |
Client side window decorations using GTK3 have been merged to Electron and backported to the new release 17.0.0 🥳 electron/electron#32650 |
I just got a new GPU which enabled me to switch from X to Wayland (with sway as window-manager). After this change, (no re-installation of the operating system), I get these errors about
Is there anything I need to do to have |
@purew Try adding the argument |
Oh wow, that actually worked, thanks! |
Curiously enough, the app then proceeds to SIGSEGV after linking to my phone
EDIT: I attempted to run via
So might be some timing issue... |
How about starting Signal with |
@genodeftest if that question is directed to me, then same behaviour:
Seems like it still attempts to start with X using that procedure. |
For all coming here from google, this is how I can start Signal in wayland native (have a current electron version installed - I'm on 25.6.0):
|
@chmanie , I couldn't get that to work, I'm guessing that you do electron development and can use that run electron apps directly. I didn't want to get that set up, so here's my version. I'm using the Debian package downloaded using the instructions to install Signal from the Signal website. I'm also using Ubuntu 22.04.03 LTS with GNOME 42.9.
If you use flatpak it would be something like this, although I didn't confirm this works.
Walking through it:
Problems I'm still having, and would like help with if anyone is experiencing them and figures out a fix:
Notes: If you're going to override the desktop file you'll want to know two things
|
Thanks @ZaneBartlett1 you launch flags are very useful.
I think desktop files in |
@Saroumane, thank you, I appreciate the recommendation and I have that recommended before, I also believe it would work. I don't really prefer that solution though, because then it puts updating the rest of the config myself in the future, which I don't want to do. A good example of this is that like I mentioned above, I'm not running that config I described because it's too unstable. When Signal does get around to officially moving everything to wayland though, if I were maintaining my own config I would need to follow and update that when they do. I'd prefer to just wait and have it happen when they push the updates. Granted if updates happen in the |
as @ZaneBartlett1 explained above, there are numerous issues with the current "solution" that makes Signal run as a Wayland application. for me, it disables the tray icon. it's hard to consider this "native support", please reopen this issue. |
@chaserene , just to make sure your comment is clear, when you say the tray icon are you referring to the left or the right image? I personally do not have any issues getting the tray icon (image to the right) to populate correctly using I'm assuming they're specifying the path to the desktop icon directly in the executable, and that isn't handled properly for when it's run as wayland. It's just a guess though, I have no confirmation of that. This is what it ends up looking like for me when it's run with Can you confirm it disables your tray icon when using the flag or do you mean the desktop icon? |
@chaserene also, I got turned around and assumed this was already open, but since this is a feature request, per this comment, it needs to be opened and considered in the Signal forum here - https://community.signalusers.org/search?q=wayland%20support. I don't actually see that anyone has opened it. If you (or anyone on the thread reading this in their email 😉 ) could open it that would be helpful. I'll open it later today if no one else does. This post just has wayyyyyyyyyyyyyyyyyyyyyyyyy better SEO than their forum, so I figured I'd update this thread on my most current understanding of the solution at this time. |
For everyone on the thread, I've gone ahead and reopened this feature request on the Signal forum here - https://community.signalusers.org/t/support-wayland-natively/58021. If you support this feature request, I believe the best thing to do at this point is heart that post. |
yes, it disabled the tray icon for me, even though I started it with thank you a lot for opening the forum thread. |
Instead of
(which works for me), you can also use:
|
Currently testing on hyprland and the window does not appear when I use the flag |
same over here, is there a way to start in maximized ? edit: |
Bug Description
I'm running on Wayland with Sway 1.1. With
GDK_BACKEND=wayland
the application fails to start.Steps to Reproduce
Actual Result:
(signal-desktop:29858): Gtk-WARNING **: 18:23:33.657: cannot open display: :1
Expected Result:
All other GTK applications work fine on my system, so Signal should work too. Currently only the x11 backend works under Xwayland.
Platform Info
Signal Version: 1.25.1
Operating System: Debian sid
Linked Device Version: Android 7.1.2 (LineageOS 14.1)
The text was updated successfully, but these errors were encountered: