After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794075 - PostSession not run if session closed by shutdown or restart
PostSession not run if session closed by shutdown or restart
Status: RESOLVED OBSOLETE
Product: gdm
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2018-03-05 11:03 UTC by Jan Wenzel
Modified: 2018-05-24 11:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
session-worker: don't kill process group before running PostSession (2.85 KB, patch)
2018-03-05 13:20 UTC, Ray Strode [halfline]
none Details | Review

Description Jan Wenzel 2018-03-05 11:03:59 UTC
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.
Comment 1 Ray Strode [halfline] 2018-03-05 13:20:01 UTC
Created attachment 369336 [details] [review]
session-worker: don't kill process group before running PostSession

killing the process group leads to the worker getting terminated,
so defer that until after running the PostSession script.
Comment 2 Ray Strode [halfline] 2018-03-05 13:20:25 UTC
can you give this patch a try ^ ?
Comment 3 Jan Wenzel 2018-03-05 14:25:50 UTC
doesn't apply with gdm 3.18.3

tested with gdm 3.26.2

/etc/gdm3/PostSession/Default is still not executed on reboot/shutdown...
Comment 4 GNOME Infrastructure Team 2018-05-24 11:46:50 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gdm/issues/363.