Execute command at logout?
Posted: Fri Aug 28, 2009 10:26 pm
I have not yet been able to find a way I can get a command executed at logout.
I just got a new netbook and wanting a lightweight install I went for Arch Linux with LXDE/Openbox and SLIM login manager.
LXDE are started with "exec ck-launch-session startlxde" in .xinitrc (yes I have HAL, can I use it for something regarding my problem?).
However ssh-agent are not automagically started or stopped by this setup as it is in many others. Well enough, the setup that suits me fine is just to start it in .bash_profile and kill it with .bash_logout. This way it works with console login also. But it doesn't really work with X11 login with LXDE; ssh-agent is started just right from .bash_profile, but neither .bash_logout nor .logout are honored by LXDE at logout time... All I want is to execute a `killall ssh-agent' at logout. Is that feasible?
I just got a new netbook and wanting a lightweight install I went for Arch Linux with LXDE/Openbox and SLIM login manager.
LXDE are started with "exec ck-launch-session startlxde" in .xinitrc (yes I have HAL, can I use it for something regarding my problem?).
However ssh-agent are not automagically started or stopped by this setup as it is in many others. Well enough, the setup that suits me fine is just to start it in .bash_profile and kill it with .bash_logout. This way it works with console login also. But it doesn't really work with X11 login with LXDE; ssh-agent is started just right from .bash_profile, but neither .bash_logout nor .logout are honored by LXDE at logout time... All I want is to execute a `killall ssh-agent' at logout. Is that feasible?