I'd like to run a shell script each time a (specific) user logs in to his XFCE4-session, as well as run another script each time that user logs off.
So far, I was able to create a script at ~/.config/xfce4/xinitrc
and run my script at logon from there.
But I couldn't figure out how to run a script at logout / logoff or when a user issues a shutdown of the computer from within XFCE4.
Importantly, those script are not to be run at system boot or shutdown, rather each time a user logs in or off through XFCE4, i.e. starting the session or ending it, respectively.