Setting XFCE terminal PS1 value and making it permanent
- by Matt
I'm trying to add the value PS1='\u@\h: \w\$ ' to my terminal in XFCE. I added the line to (what I think is) the correct area in /etc/profile. The relevant segment is:
# Set a default shell prompt:
#PS1='`hostname`:`pwd`# '
PS1='\u@\h: \w\$ '
if [ "$SHELL" = "/bin/pdksh" ]; then
# PS1='! $ '
PS1='\u@\h: \w\$ '
elif [ "$SHELL" = "/bin/ksh" ]; then
# PS1='! ${PWD/#$HOME/~}$ '
PS1='\u@\h: \w\$ '
elif [ "$SHELL" = "/bin/zsh" ]; then
# PS1='%n@%m:%~%# '
PS1='\u@\h: \w\$ '
elif [ "$SHELL" = "/bin/ash" ]; then
# PS1='$ '
PS1='\u@\h: \w\$ '
else
PS1='\u@\h: \w\$ '
fi
Most of that was already there, I just commented out the existing value and added the one I want.
By manually opening the terminal and doing . profile, I can load these values, but they don't stick - I close the terminal and reopen, and I'm back to sh-4.1$.
Maybe I'm doing this in the wrong place, but how can I make that value stick?
All the info I've found on google is Fedora/Ubuntu-specific. I use Slackware. Any help on this matter would be greatly appreciated.