Re: bash_logout & xsession help needed
On Wed, 03 Nov 2004 09:58:31 +0100, Joost Witteveen wrote:
> Wouldn't a .xsession file like this do this:
> $ cat ~/.xsession
> echo hello > /tmp/logout
> Or am I missing something?
Yes I would, but what I trying to figure out is why the ~/.bash_logout is
not being ran since man bash says:
When bash is invoked as an interactive login shell, or as a
non-interactive shell with the --login option, it first reads and executes
commands from the file /etc/profile, if that file exists. After reading
that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in
that order, and reads and executes commands from the first one that exists
and is readable. The --noprofile option may be used when the shell is
started to inhibit this behavior.
When a login shell exits, bash reads and executes commands from the
file ~/.bash_logout, if it exists.
And since my .xsession is a non-interactive shell with the --login
(well I use -l but it's the same) option I should expect ~/.bash_logout to
be ran after gnome-session and bash exit.
p.s. bash is sourcing .bash_login from my .xsession