Pre-Logout Script
houghi
houghi at houghi.org
Sun Nov 18 14:20:41 CET 2012
On Sun, Nov 18, 2012 at 12:55:07PM +0100, Erik Habicht wrote:
> Hi Hartmut,
>
> thank you for your hint. But it doesn't work since .bash_logout only work with
> a login shell. Never the less i add "logger test" to .bash_logout. But when i
> logout from my xfce session i can't see a log message in /var/log/syslog.
>
> The search continues.
http://stackoverflow.com/questions/7579438/how-to-execute-a-script-when-xfce-session-ends
That is what I found using google.
What it is is moving /usr/bin/xfce4-session to /usr/bin/xfce4-session.orig
Next make a new bash script /usr/bin/xfce4-session with e.g.:
#!/bin/bash
echo "Login : `date`" >> /tmp/testfile # Here whatever you want
/usr/bin/xfce4-session.orig
echo "Logout : `date`" >> /tmp/testfile # Here whatever you want
It would be nice to have the ability to do this nativaly in XFCE like you
can start programs when XFCE launches.
Even pointing just one program to see if it is there and if it is, run it,
would be great.
e.g. it could look at /usr/local/bin/xfce4-shutdown.sh and if it is
available, run it.
Or on any other place that won't overwrite the script.
That would be a fast way of doing this. Doing it so that you can select
programs like with an update would be more consitant, but harder to
implement, I would think.
Unless there already is a way to do all this, that is.
houghi
--
Nutze die Zeit. Sie ist das Kostbarste, was wir haben, denn
es ist unwiederbringliche Lebenszeit. Leben ist aber mehr
als Werk und Arbeit, und das Sein wichtiger als das Tun.
- Johannes Muller-Elmau
More information about the Xfce
mailing list