I would like to run a script to rsync my home directory to another machine whenever I log out of Gnome. There is a way to hook into the Gnome logout process?
Run Script During Gnome Logout – How to Guide
gnome
gnome
I would like to run a script to rsync my home directory to another machine whenever I log out of Gnome. There is a way to hook into the Gnome logout process?
Best Answer
The script /etc/gdm/PostSession/Default is run by root whenever someone quits his X session. You might add there something like
before the exit 0.
Then create a file /home/myuser/logout.sh, make it executable and add your rsync call to it.