From bf76afbb06b77237507b5279d0d555e05b5cc7f7 Mon Sep 17 00:00:00 2001 From: siflfran <45317979+siflfran@users.noreply.github.com> Date: Sun, 26 Feb 2023 19:55:27 +0100 Subject: [PATCH] Set the SHELL environment variable for keychain in .xsession (#3695) Xsession (and hence ~/.xsession) is executed in bash but does not set SHELL to the full path to bash. In case the user's login shell is something other than bash then SHELL is set to that shell. Keychain inspects the SHELL variable to find out what shell it has to generate code for, so in .xsession it generates code for the user's login shell instead for bash. This change forces SHELL to bash for keychain when invoked from .xsession, the same way it's done when generating keychain's code for bash integration. Closes #3693 --- modules/programs/keychain.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/keychain.nix b/modules/programs/keychain.nix index 61ab4823..8c47bc0a 100644 --- a/modules/programs/keychain.nix +++ b/modules/programs/keychain.nix @@ -120,7 +120,7 @@ in { ${shellCommand} | parse -r '(\w+)=(.*); export \1' | transpose -ird | load-env ''; xsession.initExtra = mkIf cfg.enableXsessionIntegration '' - eval "$(${shellCommand})" + eval "$(SHELL=bash ${shellCommand})" ''; }; }