I set my shell prompt in /etc/profile: EXPORT PS1="C:\w> " As you all know, a login shell first runs /etc/profile then ~/.bash_profile . I don't know if it's typical, but in addition my /etc/profile calls ~/.bashrc which calls /etc/bashrc which calls the various /etc/profile.d/* scripts, so that at login all my aliases get set as well as my environment variables.
Now, because the environment got set at login, the only thing I need to reset during a non-login shell, such as xterm, are the aliases so xterm calls ~/.bashrc which calls /etc/bashrc which calls /etc/profile.d/* . With that setup, my xterm environment looks exactly like my login shell environment at the console. Same path, same other environment variables, same aliases. Back in some time lost to the fuzzy memory of old age, the bash prompt (PS1) remained the same. The only place it ever gets set is /etc/profile, and since all shells are children of that first login shell, there's no way for it ever to change. But lately I noticed that xterm (and gnome-terminal) does indeed change PS1 to something else... specifically "\s-\v\$" . None of my other environment variables from /etc/profile are getting removed or overwritten. I exported a test variable (export FOOBAR="foo bar") and that remains in the xterm environment. Those of you who read and remember everything I write here may recall that I successfully built xorg 7.1 recently. Well, I restored 6.8.2, reset all my paths and libraries to /usr/X11R6, logged out, logged back in, and ran the old xorg... and it did the same thing, so it's not just something that changed with the new X. I grepped all of /usr/X11R7 (and /usr/X11R6) looking for anything that contains a command to change PS1, but I can't find anything. Still, I'm sure it must be X since the problem exists in both xterm and gnome-terminal, both of which inherit the X environment. Any idea what other process might be changing the PS1 bash prompt after xinit takes over? -- Peter B. Steiger Cheyenne, WY -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
