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

Running this flatpak claims wayland even under X11 #5

Closed
ObscureScience opened this issue Jan 25, 2023 · 6 comments
Closed

Running this flatpak claims wayland even under X11 #5

ObscureScience opened this issue Jan 25, 2023 · 6 comments

Comments

@ObscureScience
Copy link

When I run the flatpak version of this application, installed from flathub, the window show up but states:

Wayland is not supported.
Sign in using X11 instead.

I am in fact using X11, using the XFCE4 desktop environment.

Could it be some internal variable forcing wayland, in the flatpak that is causing this? Something equivalent to GDK_BACKEND=wayland for GTK?

In general other QT, GTK2+3+4 and other gui toolkit flatpak applications work fine in this installation.

% flatpak info codes.merritt.Nyrna 

Nyrna - Suspend games and applications

          ID: codes.merritt.Nyrna
         Ref: app/codes.merritt.Nyrna/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 2.9.2
     License: GPL-3.0-or-later
      Origin: flathub
  Collection: org.flathub.Stable
Installation: system
   Installed: 24,9 MB
     Runtime: org.freedesktop.Platform/x86_64/22.08
         Sdk: org.freedesktop.Sdk/x86_64/22.08

      Commit: 041a68d2843b399de88532ddf81cf76c3d1f5c7b98f791b2bcff0e87fb28e8d4
      Parent: bc67d78ffe9f899a5d7c6bd236fe638e917f121e3a83084733f08d1799739e6c
     Subject: Update manifest (1832eccc)
        Date: 2023-01-24 20:59:13 +0000
@Merrit
Copy link
Collaborator

Merrit commented Jan 25, 2023

Thanks for the report!

Could you please check the output of echo $XDG_SESSION_TYPE?

@ObscureScience
Copy link
Author

ObscureScience commented Jan 26, 2023

When I run that in a terminal emulator I get:

% echo $XDG_SESSION_TYPE
tty

Which is not what I expected.
I've grepped through my homedir, and I'm not setting it myself. Is there an assumption that this need to be manually set when not using a display manager?
I start X11 using startx with exec startxfce4 in .xinitrc
I'm running Archlinux, so sessions are managed by systemd.

I can however confirm that running XDG_SESSION_TYPE=x11 flatpak run codes.merritt.Nyrna does indeed starts the application in X11 mode.

@Merrit
Copy link
Collaborator

Merrit commented Jan 26, 2023

My understanding is that XDG_SESSION_TYPE is supposed to be more or less "standard" for checking what sort of session is running.. I am not sure the specifics of how and where that is implemented.

I tried installing Fedora with XFCE, and XDG_SESSION_TYPE is mapped to x11 as expected so I presume the issue you are seeing is because of your specific setup, and not something like the DE. I believe you should be able to add export XDG_SESSION_TYPE=x11 to your xinitrc to resolve the issue.

@ObscureScience
Copy link
Author

Thank you for the clarification.
I would argue that the fallback to wayland for non x11 values of XDG_SESSION_TYPE is questionable, now I know the issues and am happy to close the issue.

@Merrit
Copy link
Collaborator

Merrit commented Jan 27, 2023

You make a good point; I will give a think on how to do the check logic so it can pass even if the environment variables are broken.. Thanks! 💙

Merrit added a commit to Merrit/nyrna that referenced this issue Jan 27, 2023
Provides hint if user environment variables are not as expected and
gives us a chance of running successfully anyway:

flathub/codes.merritt.Nyrna#5
Merrit added a commit to Merrit/nyrna that referenced this issue Jan 27, 2023
Provides hint if user environment variables are not as expected and
gives us a chance of running successfully anyway:

flathub/codes.merritt.Nyrna#5
@Merrit
Copy link
Collaborator

Merrit commented Jan 27, 2023

I made a change to the session check, now it will only present the error if Wayland is actually detected; if the environment variable is unexpected it will try to load normally and emit an error to console about the unexpected variable. New version pushing to Flathub shortly.. hopefully that will be an improvement.

Thanks for the report and ideas! 💙 🎉

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

No branches or pull requests

2 participants