NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.54k stars 13.02k forks source link

LightDM not following default shell #167091

Open Narice opened 2 years ago

Narice commented 2 years ago

Describe the bug

LightDM is not following the default shell that is set in the nixos configuration. The login shell is hardcoded as bash instead of using the default user shell of the first shell in environment.shells.

Steps To Reproduce

Steps to reproduce the behavior:

  1. use lightdm
  2. start a session
  3. check with htop the login shell that was used: bash
  4. an alternative is to check the /etc/passwd file to see the user's assigned shell

Expected behavior

LightDM should follow the default user shell or the first shell in environment.shells to avoid confusion for the user. The user should not have to search through the source code to find out that he has to manually set lightdm user's shell to pkgs.zsh. Furthermore, the user must use lib.mkForce to not use conflict. Here is the relevant line (311): https://github.com/NixOS/nixpkgs/blob/0aac710801aec4ba545527cf41a5706028fe6271/nixos/modules/services/x11/display-managers/lightdm.nix#L307-L312

Additional context

it stems from a change that needed to be reverted after a pantheon upgrade: https://github.com/NixOS/nixpkgs/commit/c134f6443a6a595b665f749fb79df8cd2519c029

Notify maintainers

@davidak I won't ping worldofpeace as if I remember correctly, he left the project :sparkles: :stuck_out_tongue_winking_eye:

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.16.10, NixOS, 22.05 (Quokka)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.7.0pre20220127_558c4ee`
 - nixpkgs: `/nix/store/d9wpzgyjlpw1424kw2lyilah6690fnk3-source`
Narice commented 2 years ago

I spoke too fast, the given line is not the culprite, I have to idea what is now.

davidak commented 2 years ago

Let's see what's going on.

So g-s-d means gnome-settings-daemon here. elementary used to use a fork, but is it still the case? @bobby285271

The docs just say gnome-settings-daemon >= 3.27.

https://github.com/elementary/greeter/tree/2f83a9f86f1861fa91959b5fa27138880a7ef8b5

There is this repo with newer activity: https://github.com/elementary/settings-daemon

In any case, we can try to remove bash and see if the issue described in https://github.com/NixOS/nixpkgs/commit/c134f6443a6a595b665f749fb79df8cd2519c029 occurs again.

bobby285271 commented 2 years ago

So g-s-d means gnome-settings-daemon here. elementary used to use a fork, but is it still the case?

We used to use an ubuntu-forked g-s-d 3.34 but since we don't use light-locker anymore the blocker resolved itself. We are now using upstream g-s-d 3.38

There is this repo with newer activity: https://github.com/elementary/settings-daemon

I think there is nothing to do with pantheon.elementary-settings-daemon here :thinking: