[ale] Gnome session logout script??? help.

Jason Day jasonday at worldnet.att.net
Mon May 5 22:57:50 EDT 2003


On Mon, May 05, 2003 at 10:24:13PM -0400, Keith Morris wrote:
[snip]
> I want to killev, rm -rf /tmp/orbit-julie and rm -rf /tmp/evolution* if
> it is owned by user julie.
> 
> Here's where I am so far...
> 
> #!/bin/sh
> killev;
> rm -rf /tmp/orbit-julie;
> 
> if you could help me finish it that would be great.

rm -rf `find /tmp -name evolution\* -user julie`

> 
> Now, once that is done, how do I get it to execute on Gnome session
> logout?  I am Googled out!

I don't know how to do this from within gnome, but you could create your
own custom xsession and do it from there.  This will require a bit of
research, but basically you want to create an ~/.Xsession file, which
duplicates your normal X session.  Typically something like this:

#!/bin/sh
ssh-agent gnome-session

Then add a line at the end that just calls your cleanup script:

#!/bin/sh
ssh-agent gnome-session
cleanup.sh

Then, when you login, tell gdm (or xdm, kdm, whatever) to login using an
Xsession.  When you logout of gnome, the gnome-session command ends, and
your cleanup script will then get executed.  Look in /etc/gdm/Sessions,
man gdm, man xdm, man xinit for more information.

HTH,
Jason
-- 
Jason Day                                       jasonday at
http://jasonday.home.att.net                    worldnet dot att dot net
 
"Of course I'm paranoid, everyone is trying to kill me."
    -- Weyoun-6, Star Trek: Deep Space 9
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list