Xfce Forum

Sub domains
 

You are not logged in.

#1 2006-09-10 16:41:25

_savior_
Member
Registered: 2006-09-10
Posts: 5

Is it possible to execute a command / action on logout?

Hello,

Is it possible in Xfce to execute a command on logout? The same way as "Autostarted Applications" work, but I need it when I log out, not in. I have not found it in the menu, but is there a way to achive this? Is there a logout script / directory, which I can customize?

Thanks,
Savior

Offline

#2 2006-09-11 17:02:12

Pindakoe
Member
From: NL
Registered: 2003-11-26
Posts: 110

Re: Is it possible to execute a command / action on logout?

I have a custom xinitrc file for this (and some other) reason. The system default is located in /etc/X11/someplace (for Mandriva it is /etc/X11/xdg/xfce4/xinitrc; others may have slightly different places. Local compiles end up in /usr/local/somewhere (do a locate xinitrc). XFCE checks for a custom version in ~/.config/xfce4/xinitrc.

I am not using session management and have added my logout commands at the end of the xinitrc. If you use session management then I think this command should be here (not checked, so don't shoot me if it doesn't work out):

# Run xfce4-session if installed
xfcesm=`which xfce4-session`
case "x$xfcesm" in
        x|xno*)
                ;;
        *)
                $xfcesm

                if test $kill_sshagent -eq 1; then
                        eval `$sshagent -k`
                fi
# Insert logout code here.
                exit 0
                ;;
esac

Offline

#3 2006-09-14 06:18:14

_savior_
Member
Registered: 2006-09-10
Posts: 5

Re: Is it possible to execute a command / action on logout?

Thanks, I will try it as soon as I can. Unfortunately I am quite busy right now. I will let you know how it turned out smile

Offline

#4 2006-09-18 05:57:10

_savior_
Member
Registered: 2006-09-10
Posts: 5

Re: Is it possible to execute a command / action on logout?

I tried it yesterday. Works like charm, thanks. smile

Offline

Board footer

Powered by FluxBB