gnome-terminal fails to inherit exported variables (including LS_COLORS)
@LdBarthel
Submitted by LdBarthel Link to original bug (#123085)
Description
Description of Problem:
gnome-terminal failed to use LS_COLORS.
Upon inspection, LS_COLORS was defined in the
environment, but unset.
eval dircolors -b
sets LS_COLORS correctly and
the terminal uses it, however all child
gnome-terminals will have LS_COLORS unset again.
Steps to reproduce the problem:
- Start a non-login gnome-terminal and verify that LS_COLORS is not set. $env | grep LS LS_COLORS= LS_OPTIONS= --color=auto -F -b -T 0 -v
- Run dircolors and verify that LS_COLORS is set
$eval
dircolors -b
$env | grep LS LS_COLORS=no=00:fi=00:di=01;37;40:... - Spawn a child gnome-terminal and a child xterm.
Actual Results: The child gnome-terminal will show "LS_COLORS=", but the xterm will show "LS_COLORS=no=00:fi=00:di=01;37;40:..."
Expected Results: Both should have inherited the value of LS_COLORS
How often does this happen? Every time.
Additional Information: Suspecting that it might be a length issue, since the value of LS_COLORS can easily exceed 256 characters, I attempted exporting another variable of >256 characters. In this case, not even the variable name was present in the child gnome-terminal, but the entire variable was present in a child xterm. I then exported a shorter variable (2 characters), but that variable also failed to appear in a child gnome-terminal, but it did appear in a child xterm.
Subshells invoked with sh or bash appear to inherit correctly, but invocations of gnome-terminal do not.
Resolution: RESOLVED DUPLICATE