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

Desktop manager "none" is getting replaced by desktopManager.default #24958

Closed
primeos opened this issue Apr 16, 2017 · 1 comment
Closed

Desktop manager "none" is getting replaced by desktopManager.default #24958

primeos opened this issue Apr 16, 2017 · 1 comment

Comments

@primeos
Copy link
Member

primeos commented Apr 16, 2017

Issue description

I'm using the SDDM display manager which calls the xsession script with the following parameter ($1): 'none + i3'.

Expected behavior:

  • desktop manager: none
  • display manager: i3

Actual behavior:

  • desktop manager: xterm (desktopManager.default)
  • display manager: i3

The bug should be caused by the following file: nixos/modules/services/x11/display-managers/default.nix

Update: The following snippet works as intended.

Unfortunately I don't understand all the Bash hacks but it should be caused by the following code snippet:

      # The session type is "<desktop-manager> + <window-manager>", so
      # extract those.
      windowManager="''${sessionType##* + }"
      : ''${windowManager:=${cfg.windowManager.default}}
      desktopManager="''${sessionType% + *}"
      : ''${desktopManager:=${cfg.desktopManager.default}}

This one might be relevant as well:

      # Handle being called by SDDM.
      if test "''${1:0:1}" = / ; then eval exec $1 $2 ; fi

http://wiki.bash-hackers.org/syntax/pe - This might help understanding the Bash hacks. And can we please better document these hacks?

Additional questions:

  • If "''${1:0:1}" checks if / is the first character of $1: This shouldn't be required for SDDM anymore (or should it? - 8a1fcaf that commit is pretty new...). (Explained here: Fix sessions with sddm. #22723)
  • The syntax for $1 is desktopManager + windowManager -> can we please use that order in the code?

Steps to reproduce

Technical details

  • System: (NixOS: nixos-version, Ubuntu/Fedora: lsb_release -a, ...)
  • Nix version: (run nix-env --version)
  • Nixpkgs version: (run nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)
@primeos
Copy link
Member Author

primeos commented Apr 16, 2017

(Temporarily) closing this due to missing/wrong information (just noticed I was looking at the wrong place... :o). I might be able to solve this on my own.

@primeos primeos closed this as completed Apr 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant