flathub / com.slack.Slack

https://flathub.org/apps/details/com.slack.Slack
36 stars 36 forks source link

Use fallback x11 #183

Open mangas opened 1 year ago

mangas commented 1 year ago

This package seems to support wayland, could you update to the the more recent permission introduced in flatpak 1.0?

As far as I understand, this should favor wayland when that is available, which should be all the major distros at this point

https://github.com/flatpak/flatpak/blob/main/NEWS

 * A new `fallback-x11` permission grants X11 access, but only if the
   user is running in a X11 session. For applications that support
   both Wayland and X11, this can be used to ensure that the app
   doesn't have unnecessary X11 access while in Wayland, but still
   works in an X11 session.
saolof commented 1 year ago

I think that is a good idea. Right now Gnome software shows the slack flatpak as unsafe because of this.

Users should be trained to not ignore safety issues for convenience, so I would prioritize this.

dmvianna commented 1 year ago

Not so easy. I just tried that. Setting --socket=wayland and --socket=fallback-x11 makes the application crash, because it sees Wayland, but it doesn't know how to connect to its display. Whether there's more configuration available to tell Slack this is Wayland or actually it does not support it without emulation I have no idea.

saolof commented 1 year ago

Huh, that is weird. On Fedora with wayland, just disabling the x11 socket worked for me

It is possible to explicitly tell electron apps to use wayland with command line flags, using --enable-features=UseOzonePlatform --ozone-platform=wayland . It may be possible to have the .desktop file run a shell script that checks for available sockets

mvdan commented 10 months ago

This has worked for me for many months, for what it's worth - either using the wayland socket alone, or wayland plus fallback-x11. Using wayland plus x11 doesn't quite work, since Slack seems to prefer x11 in that case.

evan-a-a commented 9 months ago

We will move to a fallback-x11 configuration once Slack's electron version is modern enough to not have major bugs with the wayland implementation.

ZVNexus commented 8 months ago

Current regressions that block this as of Slack 4.37.77 (Electron 29.0.0-beta.8) under GNOME 45.3:

justin13888 commented 6 months ago

On Fedora 39 Workstation (GNOME 45 on Wayland) with scale-monitor-framebuffer enabled, the latest Slack from FlatHub starts and seems to mostly function.

This is the command I used:

flatpak run --socket=wayland --branch=stable --arch=x86_64 --command=com.slack.Slack --file-forwarding com.slack.Slack --enable-features=UseOzonePlatform --ozone-platform=wayland

Just FYI for those who want to run Slack on Wayland

ZVNexus commented 6 months ago

@justin13888 FYI the startup script for Slack already has these flags available, you just need to enable the Wayland socket: flatpak override --user --socket=wayland com.slack.Slack

Any time you start Slack afterwards will be using Wayland.