Advertisement

shutdown/logout script?

Started by June 12, 2005 03:49 AM
2 comments, last by Genjix 19 years, 3 months ago
whats the equivalent login script (.profile) for logging out?
Depends on your shell. csh and tcsh put things in ~/.logout. With other shells (e.g. bash), you must trap the logout event and have it run a script: add trap $HOME/.logout 0 to your ~/.profile (untested, got that from a couple web searches).
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Advertisement
Bash has ~/.bash_logout. I use it to run clear to clean the login screen.
Thanks for your help, but the bash_logout and bash_login are prevented from running when using kde/gnome.

with kde I found out (after extensive ircing) that the beginning part of the script is kde startup and the end, is kde shutdown, so you can simply edit that.

Thanks again though for your help.

This topic is closed to new replies.

Advertisement