Solaris


Table of Contents

.bash_logout not invoked in CDE 
Symptom 
Analysis / Reason 
Conclusion / Solution 
cmd:pkgadd for sun packages 
Install the package with the pkgadd utility. 
un-install the packages 
Install to directories rather than the package default 

.bash_logout not invoked in CDE 

Symptom 

I just found that contract to what is said in man page:

When a login shell exits, bash reads and  executes  commands
from the file ~/.bash_logout, if it exists.

My ~/.bash_logout is not invoked afer I logoff bash from any xterm window. The window can be either launch by solaris CDE or by command "xterm &".

Analysis / Reason 

Yes, both window launched by solaris CDE or by command "xterm &" are not login shells. The 'ps -f' will yield:

 UID   PID  PPID  C    STIME TTY      TIME CMD
tong 23496 23495  2 15:51:10 pts/8    0:00 bash

Conclusion / Solution 

Use -ls switch of xterm if you want, The 'ps -f' will yield:

$ ps -f
     UID   PID  PPID  C    STIME TTY      TIME CMD
    tong 23573 23572  2 15:53:48 pts/7    0:00 -bash

Note that "-" before bash!

[Tip]

!!

Add the "-ls" switch for all xterms in home session.