diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2017-02-28 11:05:55 +0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2017-04-18 01:41:17 +0200 |
commit | 6b7c5ba5353e2a81255879173de758fc5f08be62 (patch) | |
tree | 2e8f0ddb67a65f931bb53487bb9fe3460996fa47 /nixos | |
parent | 81e6e211750eca8760b57b184ac00b66db710f85 (diff) |
display-manager: fix argument handling of sddm
previously session type was not correctly set.
fixes #23264
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/x11/display-managers/default.nix | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix index 4e2c0e01ca03..543fd9399147 100644 --- a/nixos/modules/services/x11/display-managers/default.nix +++ b/nixos/modules/services/x11/display-managers/default.nix @@ -32,8 +32,14 @@ let '' #! ${pkgs.bash}/bin/bash - # Handle being called by SDDM. - if test "''${1:0:1}" = / ; then eval exec $1 $2 ; fi + # SDDM splits "Exec" line in .desktop file by whitespace and pass script path as $1 + if [[ "$0" = "$1" ]]; then + # remove superfluous $1 again + shift + # join arguments again and evaluate them in a shell context + # to interpret shell quoting + eval exec "$0" "$@" + fi ${optionalString cfg.displayManager.logToJournal '' if [ -z "$_DID_SYSTEMD_CAT" ]; then |