From: Simon Ruderich Date: Sun, 17 Apr 2022 17:07:25 +0000 (+0200) Subject: screenrc: use full path in "shell" option X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;ds=sidebyside;h=6f8099604093942d13762283a24c95d8bf8d2e25;hp=45c43298d87faec99847d517b5322070a74b9d36;p=config%2Fdotfiles.git screenrc: use full path in "shell" option GNU screen uses the value of "shell" for the $SHELL environment variable. Having a non-absolute path there can cause issues. For example, `ssh` uses $SHELL when running "Match exec" commands which fail because it uses access() to verify if the shell exists. --- diff --git a/shell/screenrc.in b/shell/screenrc.in index 19bd786..75f3f2d 100644 --- a/shell/screenrc.in +++ b/shell/screenrc.in @@ -35,8 +35,8 @@ defscrollback 50000 ignorecase on # I prefer zsh as my shell. GNU screen displays a warning if the shell isn't -# available. -shell zsh +# available. Also used for $SHELL environment variable. +shell ZSH # Don't "login" windows (= add them to the utmp database) by default. Not # useful for me and the "$" flag clutters the window flags (displayed with diff --git a/shell/setup.sh b/shell/setup.sh index 084193e..edb209f 100755 --- a/shell/setup.sh +++ b/shell/setup.sh @@ -133,6 +133,9 @@ if ! lsblk --merge >/dev/null 2>&1; then fi generate screenrc .in cat +# Use absolute path for "shell" option for proper $SHELL variable. +apply_optional_replacement screenrc \ + zsh ZSH "`installed_path zsh`" # As screen-256color is not widely supported use it only on machines where the # matching terminfo entry is available. This also requires a terminal emulator # which supports 256 colors. Also used for tmux.