How is xfce4-session-logout linked to the Quit action button?

Chris G cl at
Thu Dec 10 18:21:24 CET 2009

On Thu, Dec 10, 2009 at 04:08:38PM +0100, Nick Schermer wrote:
> 2009/12/10 Chris G <cl at>:
> > I want to add to/customise the actions available when you click on the
> > Quit button on the panel (the little green man).  How does the button
> > link to xfce4-session-logout which is what pops up the window with the
> > various possible actions.
> >
> > Is there a script in there somewhere or is the call of xfce4-session-logout
> > hard coded?
> It asks the session to logout through the sm protocol, see
> libxfcegui4/libxfcegui4.session-client.c:logout_session().
Thanks, but that doesn't really answer the question.  I was asking
what's "behind" the Quit button - i.e. when one clicks the button what
happens?  Is there a script that calls xfce4-session-logout (via the
code you have told me about or otherwise) or is there an executable
directly linked to the pressing of the button?

As it is I think I can probably get to where I want by removing the
Quit button and adding a Launchpad entry to the panel with the Icon
set to the "little green man".  The Launchpad entry can call a script
from which I can do whatever I want at shutdown and will look exactly
the same as the Quit button.

Why didn't I think of this before (like months or even years ago) when
I was asking for a way to run things at shutdown - specifically how to
close down a Virtualbox guest before logging out.

It's only a pity that xfce4-session-logout doesn't have hooks for
"things to do before shutdown/logout/suspend/hibernate".

Chris Green

More information about the Xfce mailing list