-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Add gnome wayland support #44497
Add gnome wayland support #44497
Conversation
11ec0af
to
8208ae1
Compare
Replying to #39871 (comment) here instead.
Agreed, and in Gnome's case it seems the session is set up correctly with eg. pulseaudio, journal logging and dbus without the wrapper, mostly leaving Any idea how to get the
True, there's not really any reason to switch on XDG_CURRENT_SESSION, users probably want functional software if they happen to currently run something else than Gnome. I'm guessing it even might make sense in a console session, as there could be cli tools requiring something exposed in these variables (probably not likely, but it shouldn't hurt).
I'm not opposed to that. It should be noted that Default sessionOne more problem, the wayland session have the same name as the xorg session (there's an extra session file that's explicitly for xorg) and seem to take priority. So people might end up «upgrading» to wayland without any warning which could be jarring. |
Not sure. These might be relevant: The following presentation looks extra interesting. https://lists.freedesktop.org/archives/systemd-devel/2018-June/040952.html
For GNOME Flashback and Elementary, I have changed it to jtojnar@b5b2d8d but removal of the condition might make sense too.
Right. I would actually expect most of the things in the
I would not worry about that. If the Wayland session fails to start for some reason, Actually, I am not sure GDM even respects default DE nixos option. I think it uses the user’s last selected one. |
Hmm, so looks like we're abusing
Hmm, true, I didn't think that through fully when I wrote it. The wrapper should model gdm's |
Another issue I bumped into (dogfooding the PR at the moment):
This results in any new interactive bash shells to source The problem boils down to In lieu of |
We are patching GDM to respect GDM_SESSIONS_DIR environment variable, which we are setting in the GDM module. Previously, we only took care of a single code path, the one that handled session start-up; missing the one obtaining the list of sessions. This commit patches the second code path, and also whitelists the GDM_SESSIONS_DIR so that it can be passed to the greeter. Fixes #34101
Any update on this pull request? |
What's the status on this now that gnome3 has been updated? |
@nathyong gnome-3.30 is in staging-next, I'll fix up this PR when it hits master, then we should have wayland support pretty soon :) |
3636dbc
to
a6c1ffe
Compare
Ported the I think this should be ready now 🎉 |
gnome-session inherits GDMS PATH, which is at the moment non-functional. In X11 this didn't matter as the `Xsession` wrapper would populate the environment beforehand. Wayland sessions doesn't source `Xesssion` (duh), so we patch `bin/gnome-session` to use absolute paths for `grep` and `bash`. In addition `bin/gnome-session` is a simple wrapper around `libexec/gnome-session-binary` mostly responsible for sourcing the users profile before launching the binary. This made our wrapping of `bin/gnome-session` ineffective on wayland as the profile would reset the environment. Simply wrap `libexec/gnome-session-binary` instead.
LightDM is unable to separate between `wayland-sessions/gnome.desktop` and `xsessions/gnome.desktop` so I ommitted adding this to LightDM.
This will simply make the `sessionPath` more likely to work.
This isn't strictly necessary yet as LightDM doesn't read the wayland sessions, but there's no harm in being explicit.
The test now runs wayland, which means we can no longer use X11 style testing. Instead we get gnome shell to execute javascript through its dbus interface.
098cbe8
to
75e223b
Compare
Found a much simpler fix for Reran the tests, will merge later today if no one has any objections. |
@GrahamcOfBorg build nixosTests.gnome3-gdm |
The test timed out on ofborg, hopefully not due to testing for active gnome shell too early, putting too much pressure on the machine. Lets see how it dose on hydra. |
Motivation for this change
This adds support for launching gnome wayland sessions from GDM and SDDM, using the upstream session file. See #39871 and #32806 for some more discussion.
Edit: Updated against master now that gnome 3.30 is merged.
sessionCommand support
This should work quite well, but one remaining issue is the lack of support for
displayManager.sessionCommands
and therefore alsognome3.sessionPath
. Some options here:Edit: We landed on simply not supporting
sessionCommands
on wayland for now.patching gnome-session more?
6171bc0 might be better expressed by patching
gnome-session
to always look for session files in its ownshare/
folder.Writing a test
Edit:
gnome3-gdm
now runs a wayland gnome session (GDM prefers the wayland session and we don't have a good way of telling it otherwise), so I ported it to work with wayland.cc @jtojnar
Things done
Edit:
Tested succesfully in a VM (at a6c1ffe).
Ran
gnome3
,gnome3-gdm
andsddm
tests succesfully.Tested using sandboxing (nix.useSandbox on NixOS, or option
sandbox
innix.conf
on non-NixOS)Built on platform(s)
Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
Tested compilation of all pkgs that depend on this change using
nix-shell -p nox --run "nox-review wip"
Tested execution of all binary files (usually in
./result/bin/
)Determined the impact on package closure size (by running
nix path-info -S
before and after)Fits CONTRIBUTING.md.