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 621693 - /etc/gdm/PostLogin/Default not run in gdm 2.30 if autologin is enabled
/etc/gdm/PostLogin/Default not run in gdm 2.30 if autologin is enabled
Status: RESOLVED OBSOLETE
Product: gdm
Classification: Core
Component: general
2.30.x
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2010-06-15 19:36 UTC by RobertC
Modified: 2018-05-24 10:23 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description RobertC 2010-06-15 19:36:07 UTC
In Ubuntu 10.04 with gdm 2.30.0, the file /etc/gdm/PostLogin/Default is not run if autologin 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:
#!/bin/sh
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 autologin to any existing account and reboot. Check for the existence of a /tmp/aaa file. This time it will NOT exist.

4. Disable autologin 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 if autologin is enabled.

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

Additional remarks:
A. I did a similar test with /etc/gdm/PreSession/Default and found it is NOT affected by this bug.
B. The bug is still present after upgrading the gdm package to version 2.30.2.is.2.30.0-0ubuntu1 which is available from the lucid-proposed repository.
C. This bug was initially reported here:
https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/586503
Comment 1 Jørn Odberg 2010-09-03 18:36:04 UTC
Hello.

I have some additional info, as this bug is affecting me also (we make use of this at a project with diskless clients delivered to our customers).

- When manually logging into GDM, the script is run.
- When automatically logging in without any delay, the script is NOT run.

BUT, if automatically logging in with a delay (I've set 3 seconds), the script is run.

So this bug only happens if one is automatically logged in without any delay. :-)


Thank you for your great work with Gnome. I won't use anything else. ;)


Kind regards from Norway,
Jørn.
Comment 2 RobertC 2010-11-02 12:51:30 UTC
The bug is still present in Ubuntu 10.10 (and, I guess, all recent distributions using GNOME as their desktop environment).

Well, this is not a surprise for me as there was no reaction from any developer to my bug report 5 months ago...why?

I understand this bug may seem unimportant as it was reported by only 2 persons, but I would like to add that I'm working for the public education department in Geneva/Switzerland which deploys Ubuntu/GNOME 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 before Ubuntu 11.04 is released, as this is the next version we will widely deploy.

Thanks in advance for any help!
Comment 3 dlseyer 2010-11-03 15:23:56 UTC
I am also affected by this bug, and like RobertC my deployment is in the thousands. Therefore it was essential for me to find a solution when we moved to Ubuntu 10.04, Lucid Lynx where we encountered this bug.

I don't have a actual solution, but rather a workaround. I thought it worth sharing here as it might be helpful Robert or others.

I have created a desktop launcher file /etc/xdg/autostart/d-startup.desktop

The contents of d-startup.desktop are:

[Desktop Entry]
Name=d-startup
Type=Application
Encoding=UTF-8
Version=1.0
Exec=/usr/local/bin/d-startup.sh
X-GNOME-Autostart-enabled=true

I then created a bash shell script /usr/local/bin/d-startup.sh which does the actual work. Here is an example d-startup.sh script to illustrate what can be done:

#!/bin/bash
env > tmp/d-startup.log

When any user does a login /usr/local/bin/tcd-startup.sh will be run as root but with the environment of login account. The contents of the /tmp/d-startup.log show that the value of the variable HOME is the user's home directory and the value of LOGNAME USER and USERNAME all three have the value of the login account name.

I hope this is useful to someone.

David
Comment 4 GNOME Infrastructure Team 2018-05-24 10:23:52 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/13.