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?
Execute command at logout?
Re: Execute command at logout?
Checkout the slim.conf file - /etc/slim.conf
and the section:
# Commands for halt, login, etc.
halt_cmd /sbin/shutdown -h now
reboot_cmd /sbin/shutdown -r now
halt_cmd /sbin/shutdown -h now && "your_command"
Might do it?
and the section:
# Commands for halt, login, etc.
halt_cmd /sbin/shutdown -h now
reboot_cmd /sbin/shutdown -r now
halt_cmd /sbin/shutdown -h now && "your_command"
Might do it?
-
- Posts: 2
- Joined: Fri Aug 28, 2009 10:00 pm
Re: Execute command at logout?
These commands are for halting or rebooting the system from the SLIM login screen. I hardly think they are read at LXDE logout. I've already tried "sessionstop_cmd", but it was ignored. What I would probably need is a patch to lxsession-logout to source .bash_logout or .logout at logout. Pity I'm not a programmer....