PostSession not run if session closed by shutdown or restart
Submitted by Jan Wenzel
Link to original bug (#794075)
Description
PostSession/Default is not run if the session is ended by shutdown or reboot.
It only gets run when doing a logout.
To reproduce, write the following content to /etc/gdm3/PostSession/Default
#!/bin/sh touch /var/log/gdm-postsession-timestamp exit 0
When shutting down or rebooting, the file is not touched. When logging out, it is touched.
I have tested this on Ubuntu xenial with GDM 3.18.3 and Fedora 27 with GDM 3.26.2.
The patch from https://bugzilla.gnome.org/show_bug.cgi?id=621581 does not work. The patch from https://bugzilla.gnome.org/show_bug.cgi?id=681888 does not work.