I'm using cinnamon as desktop environment on my Linux Mint system.
I want to automate a backup using unison:
Unison shall be executed prior to each logout off my session. So I was looking for a solution to execute unison every time I use the shutdown button from the cinnamon menu.
However, I was not able to find a hook that allows me to intercept the shutdown.
I also read about
/etc/lightdm/lightdm.conf. However, this does not seem to apply to my system: I seem to use the MDM Display Manager. I've been looking for hooks there.
I also tried to override
/usr/bin/cinnamon-session-quit, but this seems not to be called from the shutdown menu.