com.slack.Slack icon indicating copy to clipboard operation
com.slack.Slack copied to clipboard

Use fallback x11

Open mangas opened this issue 3 years ago • 11 comments

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.

mangas avatar Nov 01 '22 12:11 mangas

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.

saolof avatar Apr 18 '23 10:04 saolof

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.

pasunboneleve avatar Apr 26 '23 11:04 pasunboneleve

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

saolof avatar Apr 27 '23 06:04 saolof

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.

mvdan avatar Nov 29 '23 08:11 mvdan

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.

evan-a-a avatar Dec 11 '23 15:12 evan-a-a

Current regressions that block this as of Slack 4.41.96 (Electron 33) under GNOME 47:

  • Window decorations only have a 'close' button, and you cannot right click them to bringup the menu with extra actions. https://github.com/electron/electron/issues/41061
  • Slight transparent gap between window decorations and app content. When moving the window you can see the window behind the app. https://github.com/electron/electron/issues/40563
  • Unable to resize window

AKoskovich avatar Jan 21 '24 16:01 AKoskovich

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

justin13888 avatar Mar 09 '24 07:03 justin13888

@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.

AKoskovich avatar Mar 09 '24 07:03 AKoskovich