> print everything I want until I su. The username doesn't follow the user. > I'm setting USER=`whoami` and using $USER in PS1 to get the username. > I've also used `whoami` directly in the PS1 var. No luck. Is that > because the su program on HP-UX isn't designed to update any env vars? check for a logname command if there is no whoami then these settings wont work. My PS1 on a sco box looks like: PS1='\u@\h:\w\$ ' This should be too much diffrent on any *nix running bash. -- -- Bill Warner, aka Geekus Nosleepus No. 355122 Direct Alliance Corp. Unix/Linux Admin. From Don Harrop Tue Oct 31 00:39:36 2000 From: Don Harrop (Don Harrop) Date: Mon, 30 Oct 2000 17:39:36 -0700 (MST) Subject: Environment vars calling programs In-Reply-To: <200010302346.QAA24851@snappy.wiredglobal.com> Message-ID: Well, I've got it all working ok. Thanks for the input. I have two shells available to me on the box. Ksh (Korn Shell) and sh (Bash like shell). I'm using sh for my shell but the PS1 syntax below doesn't work at all. My PS1=`whoami`'@'`uname -n`':${PWD##*/}/ ' A little more of a pain huh? I also created an alias for su to get the username to change when you su. su -p isn't an option though.. 'su -' is what I aliased. The dash causes su to run through the login scripts again to get the environment vars in order.. Now I'm trying to get the package files all figured out. HP-UX uses .depot files, kinda like .rpm or .deb... I've found a site on the internet the has a buch of 'em. I need to figure out how swinstall works so I can deal with these. depot files better. Any suggestions? On 31 Oct 2000, Bill Warner wrote: > > check for a logname command if there is no whoami then these settings wont work. > My PS1 on a sco box looks like: > PS1='\u@\h:\w\$ ' > This should be too much diffrent on any *nix running bash. >