At least since Ubuntu 12.04 there is now an option session-cleanup-script which can be added to the [SeatDefaults] section of /etc/lightdm/lightdm.conf. /usr/share/doc/lightdm/lightdm.conf.gz says:
# session-cleanup-script = Script to run when quitting a user session (runs as root)
@Dan Metcalf:
At least since Ubuntu 12.04 there is now an option session- cleanup- script which can be added to the [SeatDefaults] section of /etc/lightdm/ lightdm. conf. /usr/share/ doc/lightdm/ lightdm. conf.gz says:
# session- cleanup- script = Script to run when quitting a user session (runs as root)
(Thanks to Krytarik who posted this answer in http:// ubuntuforums. org/showthread. php?t=1918649)