Re: [gdm-list] GDM session shutdown - how to execute an script before apps are killed.
- From: Brian Cameron <Brian Cameron Sun COM>
- To: Ari El <ari reads gmail com>
- Cc: gdm-list gnome org
- Subject: Re: [gdm-list] GDM session shutdown - how to execute an script before apps are killed.
- Date: Fri, 11 May 2007 16:27:57 +0800
You could try writing a wrapper script for gnome-session and call that
from the /usr/share/xsessions/gnome.desktop file. Then when
gnome-session exits, you can do your cleanup.
I need to automate the execution a command (killall -SIGHUP java) when my
GDM session closes (session logout), but *before* GDM kills all my active
session applications upon logout.
I've been playing with /etc/init.d/gdm and added my command line in the
"stop" code section, and this does get executed, but after my gdm session is
closed, so it didn't help.
I also played with the "PostSession" scripts, but then again, these are
executed after all active user apps have been killed.
Is the process killed when gnome-session exits since it is a child of
gnome-session? If so, then you'ld have to find a different hook to do
what you want since GDM doesn't know the session exits until
gnome-session is gone.
Can someone shed some light on where / how can I get this (seemingle simple
but so far elusive!) thing to work?
] [Thread Prev