View Single Post
  #3   (View Single Post)  
Old 21st February 2012
s2scott's Avatar
s2scott s2scott is offline
Package Pilot
 
Join Date: May 2008
Location: Toronto, Ontario Canada
Posts: 198
Default

okay...

Code:
scott@myhost/~ # su<cr>
Password:
$
the su(1) shell fails to receive the custom PS1 environment variable in the spawned su(1) shell.

Whereas,
Code:
scott@myhost/~ # su - <cr>
Password:
root@myhost/~ $
correctly exports my custom PS1 ('\u@\h/\w\$ ' in green) and other environment variables to the spawned su(1) shell.

I don't know if this (typing the "-") is the best/right answer. Any expertise in the matter welcomed! I'd still like to know what shell script is controlling the entry to su(1).

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