Skip to content
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

Use fallback x11 #183

Open
mangas opened this issue Nov 1, 2022 · 8 comments
Open

Use fallback x11 #183

mangas opened this issue Nov 1, 2022 · 8 comments

Comments

@mangas
Copy link

mangas commented Nov 1, 2022

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
Copy link

saolof commented Apr 18, 2023

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
Copy link

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
Copy link

saolof commented Apr 27, 2023

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
Copy link

mvdan commented Nov 29, 2023

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
Copy link
Collaborator

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.

@AKoskovich
Copy link
Collaborator

AKoskovich commented Jan 21, 2024

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

@justin13888
Copy link

justin13888 commented Mar 9, 2024

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

@AKoskovich
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants