.profile problems - prompt doesnt show colours

Rich-Boy

Verified User
Joined
Jan 24, 2006
Messages
206
Heres what a user sees at the command prompt when they log into ssh: (sshd/bash)

Code:
\[\033[1;37m\][\[\033[1;34m\]\t\[\033[1;37m\]]
\[\033[1;34m\][\[\033[1;37m\]\u\[\033[1;34m\]@\[\033[1;37m\]\h\[\033[1;34m\]]
\[\033[1;34m\](\[\033[1;37m\]\w\[\033[1;34m\])
\[\033[1;37m\]\$\[\033[00m\]

Obviously this is supposed to be nice and colourful but it's not. Heres the contents of each /home/user/.profile

Code:
WHITE='\[\033[1;37m\]'
RED='\[\033[1;34m\]'
STOPCLR='\[\033[00m\]'
UIDCHAR='\$'
UIDCHAR="${WHITE}${UIDCHAR}${STOPCLR} "
PS1="${WHITE}[${RED}\t${WHITE}] ${RED}[${WHITE}\u${RED}@${WHITE}\h${RED}] ${RED}(${WHITE}\w${RED}) ${UID$
PS2="${RED}> ${STOPCLR}"
PS3='${RED}? ${STOPCLR}'
PS4='${RED}+ ${STOPCLR}'

I'm not sure whats wrong with the code here which makes the prompt show ugly characters instead of colour and the current DIR location?

I need to know where the default .profile for each seperate user originates from because /etc/profile looks nothing like it.

Basically i need to know how to edit the .profile file that weeds its way into every new account that i make?

Many Thanks

Chris
 
Since you didn't say which OS/distro you are running, it will be a little difficult to tell you exactly where it is coming from. I know that in RedHat Linux and Solaris, the default user files come from /etc/skel . Try looking there and see if you have the the .profile that matches what you are looking at.
 
Yep, but.. found it elsewhere!

/usr/share/skel/dot.profile

Thanks for some clues :)
 
Back
Top