I am using
startx to start the graphical environment. I have a very simple
.xinitrc which I will add things to as I set up the environment, but for now it is as follows:
catwm & # Just a basic window manager, for testing. xterm
The reason I background the WM and foreground terminal and not the other way around as often is done, is because I would like to be able to come back to the virtual text console after typing
xterm. This appears to work as described.
The problem is that the
PS1 variable that currently is set to my preference in
/etc/profile.d/user.sh (which is sourced from
/etc/profile supplied by distro), does not appear to propagate to the environment of the
xterm mentioned above. The relevant process tree is as follows:
\_ -bash \_ xinit /home/user/.xinitrc -- /etc/X11/xinit/xserverrc :0 -auth /tmp/serverauth.ggJna3I0vx \_ /usr/bin/X -nolisten tcp :0 -auth /tmp/serverauth.ggJna3I0vx vt1 \_ sh /home/user/.xinitrc \_ /home/user/catwm \_ xterm \_ bash
The shell started by
xterm appears to be interactive, the shell executing
.xinitrc however is not. I am ok with both, the assumptions about interactivity seem to be perfectly valid, but now I have a non-interactive shell that spawns an interactive shell indirectly, and the interactive shell has no chance to automatically inherit the prompt, because the prompt was unset or otherwise made unavailable higher up the process tree. How do I go about getting my prompt back?