When you run terminator -e ranger
, the terminal emulator starts the program ranger
directly inside it. When you run terminator
and then start ranger
in the shell, the terminal emulator runs a shell which runs ranger
. The main difference is that your shell's interactive initialization file is sourced (e.g. ~/.bashrc
for bash, ~/.zshrc
for zsh). If your shell rc file sets some environment variables, you'll get different results depending on whether a program was started through an interactive shell or not. Here, it looks like you're setting EDITOR
or VISUAL
in your .bashrc
. If you don't, you get your system's default, which is nano.
The fix is to set environments variable where they should be set, i.e., in your session initialization file. On most setups, this is ~/.profile
. Do not set environment variables in .bashrc
, .zshrc
or the like. See
Which setup files should be used for setting up environment variables with bash?
Difference between .bashrc and .bash_profile
Correctly setting environment