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
Upstream sessions #43992
Upstream sessions #43992
Conversation
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: gnome3.gdm, gnome3.gpaste Partial log (click to expand)
|
Failure on x86_64-linux (full log) Attempted: gnome3.gdm, gnome3.gpaste Partial log (click to expand)
|
Failure on aarch64-linux (full log) Attempted: gnome3.gdm, gnome3.gpaste Partial log (click to expand)
|
This seems like good start :) Did a little testing (with gdm):
|
Add Login, maybe this:
Ad GPaste, that is probably the keyboard shortcuts XML file. I do not think it is possible Maybe we could create I tried lightdm now, but it does not even see the session. Also in the log, I see ** (lightdm-gtk-greeter:802): WARNING **: 11:41:49.170: [PIDs] Failed to execute command: /usr/lib/at-spi2-core/at-spi-bus-launcher |
Right, setting mutable users to false made login work with a hardcoded password in a VM, not sure why it won't work on my hardware though (tested on two machines now, will investigate some more). |
Regarding GPaste, I guess, we also could extend the |
@@ -55,14 +55,6 @@ in { | |||
description = "Enable Gnome 3 desktop manager."; | |||
}; | |||
|
|||
sessionPath = mkOption { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to redirect users to the new option (extraSessionFilePackages?) instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It serves a completely different purpose. The replacement to sessionPath
is fixing packages.
(had a bad Another option for GPaste would be to compile the schema in |
Yep, doing as you suggest in #42176 (comment) would be another possibility. |
Hmm, sddm doesn't see the session either. Maybe that's missing something. |
There is |
I thought it was already doing that,
|
Well there is |
Oh, I skimmed and didn't notice |
This should be fine diff --git a/pkgs/desktops/gnome-3/core/gnome-session/default.nix b/pkgs/desktops/gnome-3/core/gnome-session/default.nix
index 7b407aad506..6f9cc384fa2 100644
--- a/pkgs/desktops/gnome-3/core/gnome-session/default.nix
+++ b/pkgs/desktops/gnome-3/core/gnome-session/default.nix
@@ -33,8 +33,10 @@ stdenv.mkDerivation rec {
preFixup = ''
for desktopFile in $(grep -rl "Exec=gnome-session" $out/share)
do
- echo "Patching gnome-session path in: $desktopFile"
+ echo "Patching Exec gnome-session path in: $desktopFile"
sed -i "s,^Exec=gnome-session,Exec=$out/bin/gnome-session," $desktopFile
+ echo "Patching TryExec gnome-sesison path in: $desktopFile"
+ sed -i "s,^TryExec=gnome-session,TryExec=$out/bin/gnome-session," $desktopFile
done
wrapProgram "$out/bin/gnome-session" \
--prefix PATH : "${glib.dev}/bin" \
|
Also, debug = mkEnableOption "gnome-session debug messages"; It would be nice to still have an interface to do that. |
Adding |
Do these lightdm errors look of any interest? |
Not particularly. With the latest commit, I am able to launch GNOME Shell in lightdm in VM, but it does not seem to receive environment variables (including Also, I opened https://gitlab.gnome.org/GNOME/gnome-session/merge_requests/5 so we could drop the substs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh so that's what it was about.
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: gnome3.gdm, gnome3.gnome-session, gnome3.gpaste Partial log (click to expand)
|
TryExec needs absolute path too, otherwise the desktop file will be ignored unless gnome-session is in PATH, in which case, we would not need to patch Exec.
This makes it easier to support a wider variety of .desktop session files. In particular this makes it possible to use both the «legacy» sessions and upstream session files. We separate `xsession` into two parts, `xsessionWrapper` and `xsession`. `xsessionWrapper` sets up the correct environment and then lauches the session's Exec command (from the .desktop file), falling back to launching the default window/desktopManager through the `xsession` script (required by at least some nixos tests). `xsession` then _only_ handles launching desktop-managers/window-managers defined through `services.xserver.desktopManager.session`.
The default session might be found in `extraSessionFilePackages`, but it's not viable to detect at evaluation time, so emit a warning. In LightDM instead of checking `defaultSessionName` against `displayManager.session.names` we rely on the assertions in `desktopManager` and `windowMananger` and just check that there's at least one default set. The second assertion could never actually be triggered.
Sessions from `extraSessionFilePackages` isn't picked automatically as the default session.
Implement through `services.xserver.displayManager.sessionCommands`.
0e364e9
to
ea3568d
Compare
Additional list of packages to be added to the session search path. | ||
Useful for GNOME Shell extensions or GSettings-conditional autostart. | ||
|
||
Note that this should be a last resort, patching the package is preferred (see GPaste). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really minor punctuation nit:
"Note that this should be a last resort; patching the package is preferred (see GPaste)."
"Note that this should be a last resort, and patching the package is preferred (see GPaste)."
(either of the above is fine)
ea3568d
to
62e665e
Compare
Thanks @hedning, now it looks like it is ready to go; all tasks completed and tests passing. There is a space for more clean-ups, for example, removing pulseaudio from the session wrapper (it is supposed to be socket-activated on modern systems), but we can leave it for future PRs. Asking maintainers of other DEs for their input: @ttuegel (KDE), @romildo (lxqt), @yegortimoshenko (xfce). |
@worldofpeace @jtojnar We could check that the default session exists when actually building the
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Motivation for this change
See #39871
This is just a first swallow, in the future pull requests we will want to convert more DEs and investigate Wayland.
Things done
sandbox
innix.conf
on non-NixOS)gnome3
gnome3-gdm
cc @hedning, @worldofpeace