RHEL8(とそのクローン) も
.bash_profile とか .bashrc に
export LANG=“ja_JP.eucjp”
と書くと gnome-terminal が起動できなくなる。
回避方法のメモ
.bashrc の最後に
export LANG=“ja_JP.eucjp”
を追記
デフォルトの .bashrc は .bash_profile の先頭で読み込むように書かれていた。
この書き方だとログインセションでも bash は .bashrc を読み込む
なので、
.bash_profile の最後に
if [ “$XDG_CURRENT_DESKTOP” = “GNOME” ] ; then
export LANG=“ja_JP.UTF-8”
fi
を追記
そうするとログインセッションのGNOMEディスクトップで起動した
gnome-terminal は ja_JP.UTF-8 で起動するけど、
その中で起動される bash は ja_JP.eucjp となる。
su - hogehoge とか ssh localhost@hogehoge はログインセッションなので
.bash_profile を読み込むけど XDG_CURRENT_DESKTOP が無いので
.bashrc に書いた ja_JP.eucjp が設定される。