I am using gdm3 as my login manager. Upon login, all the
PATH modifications in my
.profile are set and exported correctly. For example, lines like these below work fine:
if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" fi
However, line below doesn't work as expected:
# Use colors for less, man, etc. [[ -f ~/.LESS_TERMCAP ]] && . ~/.LESS_TERMCAP
~/.LESS_TERMCAP just contains a bunch of
export statements. Interestingly, if I start up my terminal and type
. .profile, then
~/.LESS_TERMCAP does get sourced. Why isn't that happening at startup? I come across many dot files that include such 'and list' constructs, so I am a bit confused. Thank you for all the help.
As noted in the comments by @fra-san, part of the issue is resolved by noting that the display manager runs
dash instead of
bash, and replacing
[[ with appropriate test constructs. However, I am still perplexed by the following situation: the file
~/.LESS_TERMCAP is not sourced, even though
PROFILE_VARIABLE is set.
~/.LESS_TERMCAP contains the following:
export LESS_TERMCAP_mb=$'\e[1;32m' export LESS_TERMCAP_md=$'\e[1;32m' export LESS_TERMCAP_me=$'\e[0m' export LESS_TERMCAP_se=$'\e[0m' export LESS_TERMCAP_so=$'\e[01;33m' export LESS_TERMCAP_ue=$'\e[0m' export LESS_TERMCAP_us=$'\e[1;4;31m'
. ~/.profile does bring color to man pages.
I am on Debian Sid, running gdm3 and i3. Please let me know any additional info I can provide.