/etc/gdm/PostLogin/Default file not run if automatic login is enabled

Bug #586503 reported by Robert Chalmas on 2010-05-27
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gdm (Ubuntu)

Bug Description

Binary package hint: gdm

In Ubuntu 10.04 with gdm 2.30.0, the file /etc/gdm/PostLogin/Default is not run if automatic login is enabled.

This was tested on 2 very different configurations:

- 2 desktops which were recently upgraded from Jaunty to Karmic then to Lucid;

- 1 laptop with a fresh install of Lucid.

Steps to reproduce the bug:

1. Create a simple /etc/gdm/PostLogin/Default file, for example with this content:


echo "Test" > /tmp/aaa

2. Logout from your session and log in again.

Check for the existence of a /tmp/aaa file. It will exist.

3. Delete the /tmp/aaa file. Enable automatic login to any existing account and reboot.

Check for the existence of a /tmp/aaa file. This time it will NOT exist.

4. Disable the automatic login and reboot, then login into the same account as before.

Check for the existence of a /tmp/aaa file. Now it will exist again.

My conclusion is that the file /etc/gdm/PostLogin/Default is run during a manual login but ignored during an automatic login.

I would expect the file to be run in both cases, as this happened for example with Jaunty.

One more detail: I did a similar test with /etc/gdm/PreSession/Default and found it is NOT affected by this bug.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: gdm 2.30.0-0ubuntu5
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic
Uname: Linux 2.6.32-22-generic i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Thu May 27 21:04:56 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
SourcePackage: gdm
Architecture: i386
DistroRelease: Ubuntu 10.04
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
NonfreeKernelModules: nvidia
Package: gdm 2.30.2.is.2.30.0-0ubuntu1
PackageArchitecture: i386
 PATH=(custom, no user)
ProcVersionSignature: Ubuntu 2.6.32-22.36-generic
Tags: lucid
Uname: Linux 2.6.32-22-generic i686

Robert Chalmas (robert-chalmas) wrote :
Sebastien Bacher (seb128) wrote :

Thank you for your bug report, the issue is fixed in maverick now

Changed in gdm (Ubuntu):
importance: Undecided → Low
status: New → Fix Released
Changed in gdm (Ubuntu Lucid):
assignee: nobody → Sebastien Bacher (seb128)
importance: Undecided → Low
status: New → Fix Committed
Sebastien Bacher (seb128) wrote :

There is a candidate lucid update which has been uploaded now, the debdiff is on bug #585574

Changed in gdm:
status: Unknown → Fix Released

Accepted gdm into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed

apport information

tags: added: apport-collected
description: updated
Robert Chalmas (robert-chalmas) wrote :

Many thanks for caring about this problem!
Well, I can't give a unique answer. Here are my (rather strange) results after upgrading to gdm 2.30.2.is.2.30.0-0ubuntu1:
- on one of my configurations (2 desktops upgraded from Jaunty) the /etc/gdm/PostLogin/Default file is now run even if autologin is enabled;
- on the other configuration (the laptop with a fresh install of Lucid) it's still not working as soon as autologin is enabled (but still working ok with manual login).
Let me know if you need more information to further investigate the problem.

Robert Chalmas (robert-chalmas) wrote :

I'm very sorry but I have to modify my report from 2 days ago.
I repeated all my tests today and was not successful on any machine with the proposed version of gdm.
I may have forgotten to erase the file generated by my "echo" command in /etc/gdm/PostLogin/Default during a manual login and erroneously believed it had been generated during an automatic login.
Now, after new tests on 3 different machines, I can confirm that nothing is generated during an automatic login, so /etc/gdm/PostLogin/Default is still not run.

Sebastien Bacher (seb128) wrote :

the upstream change is to fix the the Init Default script not the PostLogin one so maybe those are different issues

Robert Chalmas (robert-chalmas) wrote :

Yes, I think this is a different issue. Should I report the bug upstream ?

Sebastien Bacher (seb128) wrote :

would be nice to open a bug upstream yes

Done! Here is a link to the upstream bug report:

Sebastien Bacher (seb128) wrote :

thank you for sending the bug to GNOME

Changed in gdm:
status: Fix Released → Unknown
Changed in gdm (Ubuntu Lucid):
assignee: Sebastien Bacher (seb128) → nobody
status: Fix Committed → Triaged
Changed in gdm (Ubuntu):
status: Fix Released → Triaged
Changed in gdm:
status: Unknown → New
Changed in gdm:
importance: Unknown → Medium

The bug is still present in Ubuntu 10.10.

This is not a surprise for me as there was no reaction from any developer to my bug report on GNOME Bugzilla 5 months ago!
( https://bugzilla.gnome.org/show_bug.cgi?id=621693 )

Does somebody have some relations which could help to make this problem investigated and fixed ?

I know this bug may seem unimportant as it is mentioned as affecting only 2 people, but I would like to add that I'm working for the public education department in Geneva/Switzerland which deploys Ubuntu on 5000+ workstations, so the real number of affected users is very high, considering this bug makes impossible to properly restore a mandatory profile from our servers.

So I hope this bug can be fixed for Ubuntu 11.04, as this is the next version we will widely deploy.

chris (puwei23) wrote :

It's still present in Ubuntu 11.04.

I try to fix it, and it work fine for me now. In file gdm-simple-slave.c,

static void
stop_greeter (GdmSimpleSlave *slave)
        char *username;

        g_debug ("GdmSimpleSlave: Stopping greeter");

        /* Run the PostLogin script. gdmslave suspends until script has terminated */
        username = gdm_session_direct_get_username (slave->priv->session);

        if (username != NULL) {
                gdm_slave_run_script (GDM_SLAVE (slave), GDMCONFDIR "/PostLogin", username);
        g_free (username);

        if (slave->priv->greeter == NULL) {
                g_debug ("GdmSimpleSlave: No greeter running");

        gdm_welcome_session_stop (GDM_WELCOME_SESSION (slave->priv->greeter));
        gdm_greeter_server_stop (slave->priv->greeter_server);

        g_object_unref (slave->priv->greeter);
        slave->priv->greeter = NULL;

Mathew Hodson (mhodson) wrote :

The upload approved in lucid-proposed was for a different issue, so removing the verification-needed tag.

tags: removed: verification-needed
Rolf Leggewie (r0lf) wrote :

lucid has seen the end of its life and is no longer receiving any updates. Marking the lucid task for this ticket as "Won't Fix".

Changed in gdm (Ubuntu Lucid):
status: Triaged → Won't Fix
Changed in gdm:
status: New → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.