Startup/shutdown script - xfce *does* have a reasonable way of doing it
cl at isbd.net
Tue Feb 24 10:59:22 CET 2009
Well I've found the answer, in fact the answer to this and many of my
other 'problems' with xfce.
If you put a file called xinitrc in $HOME/.config/xfce4 it is
executed in preference to the default /etc/xdg/xfce4/xinitrc.
So all I need to do to get my hearts desire of a *script* to start all
my programs and also a place to do things when logging out from X is
to copy /etc/xdg/xfce4/xinitrc to $HOME/.config/xfce4 and then modify
In fact it's very easy to find where to put things to run 'before' and
'after', you put them either side of running the xfce4 session manager.
I.e. in an extract from xinitrc :-
echo "XXX: About to start xfce4-session"
# Run xfce4-session if installed
case "x$xfcesm" in
if test $kill_sshagent -eq 1; then
eval `$sshagent -k`
echo "XXX: Returned from xfce4-session"
The two echo lines are executed exactly at the times I want and appear
in .xsession-errors. There are various possibilities for doing this
more neatly like a wrapper round xfce4-session but for the moment just
editing the xinitrc will do me fine.
Why didn't anyone tell me about this - it's satisfied nearly all my
problems with xfce4.
More information about the Xfce