View Single Post
  #1   (View Single Post)  
Old 20th February 2012
s2scott's Avatar
s2scott s2scott is offline
Package Pilot
 
Join Date: May 2008
Location: Toronto, Ontario Canada
Posts: 198
Default PS1 command line prompt AFTER su

As established in the /etc/profile, I have the following 'PS1' custom prompt:

Code:
PSGreen() {
print "\[\033[00;32m\]"
}
PSRestore() {
print "\[\033[01;00m\]"
}
export PS1='$(PSGreen)\u@\h/\w\$(PSRestore) \$ '
It works great for user login and root login; however, it does NOT appear to run (or to be of any affect) if at the command line post 'su'

Does anyone know which 'profile' or '.profile' is invoked when 'su' is run and where I should place this script fragment? (I have tried /root/.profile and several others.)

With thanks,
/S
__________________
Never argue with an idiot. They will bring you down to their level and beat you with experience.
Reply With Quote