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
Member

@worldofpeace worldofpeace commented Dec 11, 2019

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

@worldofpeace
Copy link
Member

@worldofpeace 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 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 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
Member

@worldofpeace worldofpeace commented Dec 11, 2019

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
Member

@worldofpeace worldofpeace commented Dec 11, 2019

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.
@hedning hedning force-pushed the hedning:gdm-only-default-with-auto branch from 9cc9635 to d04157f Dec 11, 2019
@worldofpeace
Copy link
Member

@worldofpeace worldofpeace commented Dec 11, 2019

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

@worldofpeace worldofpeace merged commit d3a9b09 into NixOS:master Dec 11, 2019
12 checks passed
12 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@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 jtojnar commented Dec 11, 2019

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

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.