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

nixos/gdm: do not force the session #75489

Merged
merged 1 commit into from Dec 11, 2019

Conversation

hedning
Copy link
Contributor

@hedning hedning commented Dec 11, 2019

Motivation for this change

Having a default session resulted in GDM not remembering the last used
session. Ideally the session script should only set the session if it
wasn't set before, but this is a quick fix which hopefully covers the
most common scenario.

Specifically I was logged into the xterm session and had to set the default desktopmanager to none to restore the previous behavior.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • 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 nix-review --run "nix-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

@worldofpeace
Copy link
Contributor

This isn't so simple. I need to do a little rewrite because it sets the session for all users.

@worldofpeace
Copy link
Contributor

worldofpeace commented Dec 11, 2019

We agreed on this on irc https://logs.nix.samueldr.com/nixos-dev/2019-12-11#2873682;

@hedning Could you just comment it for now? When the display-manager module is changed to actually make sense I'll switch this around a bit.

@hedning
Copy link
Contributor Author

hedning commented Dec 11, 2019

Ah, didn't think of the multi user use-case.

Could you just comment it for now?

Comment out the whole script to avoid the current problems you mean?

@jtojnar
Copy link
Contributor

jtojnar commented Dec 11, 2019

I think I want to add the script to lightdm too 😈, the problem does not exist in #53843 any more.

@worldofpeace
Copy link
Contributor

I think I want to add the script to lightdm too smiling_imp, the problem does not exist in #53843 any more.

autoLogin works reliably there though, so it would only work for the https://gitlab.gnome.org/GNOME/gdm/issues/542 case. It should verifiable work in any dm with accountsservice support.

@worldofpeace
Copy link
Contributor

Comment out the whole script to avoid the current problems you mean?

While the problem doesn't exist because defaultSession is null in #53843, it's not exactly right retrospective to what was discovered. Nix is lazy so you can just comment where the derivation is used (the exact block you've touched in the diff).

Having a default session resulted in GDM not remembering the last used
session.

So do not force the session until setSessionScript is made aware of the
last session used.
@worldofpeace
Copy link
Contributor

Lol, I bet in <2 days this todo will be gone.

@worldofpeace worldofpeace merged commit d3a9b09 into NixOS:master Dec 11, 2019
@worldofpeace worldofpeace changed the title nixos/gdm: only set session on auto login nixos/gdm: do not force the session Dec 11, 2019
@jtojnar
Copy link
Contributor

jtojnar commented Dec 11, 2019 via email

@hedning hedning deleted the gdm-only-default-with-auto branch March 1, 2020 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants