Motivation for this change
Edit: Updated against master now that gnome 3.30 is merged.
This should work quite well, but one remaining issue is the lack of support for
Edit: We landed on simply not supporting
patching gnome-session more?
6171bc0 might be better expressed by patching
Writing a test
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
One 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.
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
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.
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.
Found a much simpler fix for
Reran the tests, will merge later today if no one has any objections.