Artificial intelligent assistant

Does X mangle prompt environment variables? I'm starting it with `startx`. Before that I have `PS1` in my environment: $ cat /proc/self/environ | tr '\0' '\n' | egrep '^PS' PS1=[\u@\H \w] PS3=> PS2=> PS4=+ From inside `X` I get: $ cat /proc/self/environ | tr '\0' '\n' | egrep '^PS' PS3=> PS4=+ I checked in both `GNOME` and `awesome`. Is it expected behavior? Can I do something about it?

No, X doesn't mangle environment variables. But bash does; specifically, it unsets `PS1` and `PS2` in non-interactive shells:


$ PS1='my PS1' PS2='my PS2' PS3='my PS3' PS4='my PS4' bash -c export |grep PS
declare -x PS3="my PS3"
declare -x PS4="my PS4"


Bash is probably executed somewhere as part of your login sequence. That's guaranteed if your `/bin/sh` is bash and common even if it isn't.

The prompt is a shell setting, meaningful only in interactive shells, so it doesn't make sense to export it to the environment. Set it as part of your shell's interactive initialization file `.bashrc` instead.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 2b180095cc4e2140e91685c8db866275