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: make desktopManager.default work #73378

Merged
merged 1 commit into from Nov 22, 2019

Conversation

@worldofpeace
Copy link
Member

@worldofpeace worldofpeace commented Nov 14, 2019

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 @

@hedning
Copy link
Contributor

@hedning 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
Member Author

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

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

@worldofpeace
Copy link
Member Author

@worldofpeace worldofpeace commented Nov 15, 2019

Ok, let's use OrderedSet and set comprehension.

@worldofpeace worldofpeace requested a review from jtojnar Nov 17, 2019
@worldofpeace worldofpeace mentioned this pull request Nov 22, 2019
1 of 10 tasks complete
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 force-pushed the worldofpeace:gdm-default-session branch from 4c79ba5 to d8b50bf Nov 22, 2019
@worldofpeace worldofpeace merged commit bec88e1 into NixOS:master Nov 22, 2019
1 check was pending
1 check was pending
grahamcofborg-eval Checking original out paths
Details
@worldofpeace worldofpeace deleted the worldofpeace:gdm-default-session branch Nov 22, 2019
worldofpeace added a commit to worldofpeace/nixpkgs that referenced this pull request Nov 22, 2019
desktopManager.default now works in GDM with NixOS#73378.
So we can set the default session for autoLogin with GDM.

We also rewrite the test to make use of the systemd
services and targets available in Gnome now.
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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

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