Skip to content

nixos/gdm: make desktopManager.default work#73378

Merged
worldofpeace merged 1 commit intoNixOS:masterfrom
worldofpeace:gdm-default-session
Nov 22, 2019
Merged

nixos/gdm: make desktopManager.default work#73378
worldofpeace merged 1 commit intoNixOS:masterfrom
worldofpeace:gdm-default-session

Conversation

@worldofpeace
Copy link
Copy Markdown
Contributor

Motivation for this change

Unfortunately, you can't configure the default user-session
with GDM like lightdm. I've opened a feature request 0
but I'd like to be able to do this now.

We use a GObject Python script using bindings to AccountsService
to achieve this. I'm hoping the reliable heuristic for session names
is the file's basename. We also have some special logic for which
method to use to set the default session. It seems set_x_session is
deprecated, and thusly the XSession key, but if that method isn't used
when it's an xsession it won't be the default in GDM.


I'm not sure this will work right with desktopManager + windowManager

Things done

Played with a vm with multiple users and if all their default sessions were as I declared.

  • 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 @

@ofborg ofborg bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Nov 14, 2019
@hedning
Copy link
Copy Markdown
Contributor

hedning commented Nov 14, 2019

I'm not sure this will work right with desktopManager + windowManager

I think it should work, every dm+wm combo gets it's own .desktop file named ${dm}+${wm}.desktop, so I can't see any real reason why it wouldn't work?

@worldofpeace
Copy link
Copy Markdown
Contributor Author

I'm not sure this will work right with desktopManager + windowManager

I think it should work, every dm+wm combo gets it's own .desktop file named ${dm}+${wm}.desktop, so I can't see any real reason why it wouldn't work?

Oh, thanks for clearing that up. I wasn't sure if they were named that way.

@worldofpeace
Copy link
Copy Markdown
Contributor Author

Ok, let's use OrderedSet and set comprehension.

Unfortunately, you can't configure the default user-session
with GDM like lightdm. I've opened a feature request [0]
but I'd like to be able to do this now.

We use a GObject Python script using bindings to AccountsService
to achieve this. I'm hoping the reliable heuristic for session names
is the file's basename. We also have some special logic for which
method to use to set the default session. It seems set_x_session is
deprecated, and thusly the XSession key, but if that method isn't used
when it's an xsession it won't be the default in GDM.

[0]: https://gitlab.gnome.org/GNOME/gdm/issues/535
@worldofpeace worldofpeace merged commit bec88e1 into NixOS:master Nov 22, 2019
@worldofpeace worldofpeace deleted the gdm-default-session branch November 22, 2019 22:49
jtojnar added a commit to jtojnar/nixfiles that referenced this pull request Dec 30, 2019
GDM keeps defaulting to xterm for me

Probably caused by NixOS/nixpkgs#73378
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants