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 727703 - session scripts run for the "gdm" user as well
session scripts run for the "gdm" user as well
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
3.12.x
Other OpenBSD
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2014-04-06 11:09 UTC by Antoine Jacoutot
Modified: 2014-04-07 16:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
worker: don't run shell scripts for program sessions (2.40 KB, patch)
2014-04-07 14:16 UTC, Ray Strode [halfline]
committed Details | Review

Description Antoine Jacoutot 2014-04-06 11:09:08 UTC
Hi.

It seems that this commit:
83b48a305e71637181975fc7ec479a71079b6fbc
had the side effect of the GDM process to run the PreSession/PostSession scripts for the "gdm" user as well (before, it would only run for users login in).

I don't know if that was intended, but I use these scripts intensively in my gnome office setups and GDM 3.12.0 broke for me because of this change.
It was easy enough to fix (I just added a conditional in the scripts to not run anything if $USER is the user running GDM), but I just wanted to report it just in case...

Feel free to close this bug in case that is now expected behavior.

Thank you.
Comment 1 André Klapper 2014-04-06 12:31:40 UTC
CC'ing Jasper who wrote https://git.gnome.org/browse/gdm/commit/?id=83b48a305e71637181975fc7ec479a71079b6fbc
Comment 2 Jasper St. Pierre (not reading bugmail) 2014-04-06 13:57:55 UTC
This was unintended. We were actually planning on getting rid of these session scripts entirely next cycle, though. What you use these scripts for?
Comment 3 Antoine Jacoutot 2014-04-06 14:44:33 UTC
(In reply to comment #2)
> This was unintended. We were actually planning on getting rid of these session
> scripts entirely next cycle, though. What you use these scripts for?

Hi Jasper.

Mostly to preconfigure several of user settings (gsettings, gconf, evolution accounts, starting some interactive zenity scripts...).
In addition to that I also use them on OpenBSD installations to change the drm(4) device ownership (which is 0600 ownbed by 0:0 by default here).

I can locally patch gdm to handle the drm(4) stuff where the workstations run OpenBSD, so that's not a big deal.
For the rest, I suppose I can use some autostart xdg script or something?
Comment 4 Jasper St. Pierre (not reading bugmail) 2014-04-06 14:52:44 UTC
Default gsettings should be handled through dconf profiles. For the rest, I'd use XDG autostart, yeah.
Comment 5 Antoine Jacoutot 2014-04-06 15:00:30 UTC
(In reply to comment #4)
> Default gsettings should be handled through dconf profiles.

How do you handle $USER in default dconf profiles?
That is the reason I started using GDM scripts because I am auto-setting up evolution sources (calendar, email...) and that requires knowing the user name.
Anyway, that part could also be moved to XDG autostart as well I suppose.
Comment 6 Ray Strode [halfline] 2014-04-07 14:16:38 UTC
Created attachment 273715 [details] [review]
worker: don't run shell scripts for program sessions

GDM uses a worker to manage PAM for user sessions and
greeter sessions. For the latter case we shouldn't run
the various Pre/Post scripts, but commit
Sb48a305e71637181975fc7ec479a71079b6fbc broke that.

This commit changes the code to prevent those scripts
from getting run again.
Comment 7 Ray Strode [halfline] 2014-04-07 14:17:34 UTC
I've pushed this patch for now, so we don't keep the behavioral change
in 3.12 series.

Attachment 273715 [details] pushed as e120675 - worker: don't run shell scripts for program sessions
Comment 8 Antoine Jacoutot 2014-04-07 16:01:11 UTC
(In reply to comment #7)
> I've pushed this patch for now, so we don't keep the behavioral change
> in 3.12 series.
> 
> Attachment 273715 [details] pushed as e120675 - worker: don't run shell scripts for
> program sessions

Thanks Ray, that indeed fixes it :-)