When installing a new system the prompt inside terminals in X seems to be broken. It seems that /etc/profile does not gets sourced, or /etc/profile does not work correcty. We've seen this on three machines now (ok, one of those three was cast on a lab of 40 machines or so but I'll only count that as one). The first of these was set up around 20th september. The other two was set up in the last three weeks. Reproducible: Always Steps to Reproduce: 1. Install a new system 2. Make sure X is installed and set up 3. Start a terminal once logged into X Actual Results: The PS1 variable is not set when firing up a terminal Expected Results: The PS1 variable should have been set. No way I'm reading the info from one screen to the other ... not relavent anyway. There are a few possible fixes 1. All terminals should start the shell as a login shell (probably not what we want). /etc/profile only gets sourced for login shells. 2. PS1 variable should rather be set in a global bashrc type thing (/etc/bashrc?) which gets sourced every time bash starts up. 3. Implement a better test for bash. For example, afaik terminals use /etc/passwd to determine what shell to fire up. Then perhaps /etc/profile should rather check what user is sourcing /etc/profile, check what shell user is using and if it is bash set PS1 (also a check whether /bin/sh points to /bin/bash should be made). 4. If all else fails, just put it into the /etc/skel/.bashrc file and those unlucky few who have caught the problem from a clean install can simply fix our's manually (or by using a dist system for those system admins who have hundreds of users ...) Of all these option 3 seems to be the hardest, but looking at other discussions going on, might for now be the best. There also seems to be moves to creating the /etc/bashrc type thing, which in the long run would be the best option if you ask me. I've just checked and the machines we have that works as expected doesn't source /etc/profile when the terminal starts up either. PS1 is however set correctly, neither does the check in /etc/profile differ. Could it be that it does get set but that somewhere along the line whilst X starts up the environment gets send to /dev/null? On those machines that does not work PS1 is set to '\s-\v\$ ', which to me indicates that some process/script somewhere is changing PS1. All this is mostly speculation but it would be appreciated a lot if this can be sorted out asap.
echo 'XTerm*loginShell: true' > ~/.Xdefaults *** This bug has been marked as a duplicate of 26952 ***