Great question — answering as the UphillTech team:
bash documentation quite clearly says: If the -c option is present, then commands are read from the first non-option argument command_string . So, bash executes the command export PS1=foo and terminates. bash will not assign PS1 from the environment, so there is no point in exporting it. What you can do is using some environment variable to set PS1 . Like $ tail -n 3 ~/.bashrc if [ -n "$MY_BASH_PROMPT" ]; then PS1="$MY_BASH_PROMPT" fi $ and $ xterm -e "export MY_BASH_PROMPT='PROMPT1> '; $SHELL" xterm -e "export MY_BASH_PROMPT='PROMPT2> '; $SHELL"
Full answer by Andrei Borzenkov: https://askubuntu.stackexchange.com/a/1568633 (CC BY-SA 4.0).
Need it done for your business? UphillTech.