can't catch $USER in /etc/gdm/PostLogin/Default

Bug #463376 reported by ericlesoll on 2009-10-29
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Fix Released
gdm (Ubuntu)
Ubuntu Desktop Bugs

Bug Description

Ubuntu Karmic Koala
After a fresh install on some machines and update from Jaunty on another one, we can't catch $USER $USERNAME $LOGNAME
from /etc/gdm/PostLogin/Default, we get "gdm" for all variables instead of real login name. It was working since 7.04 version.
If in a terminal we run : echo $USER, we get the real login name.

ericlesoll (ericlesoll) on 2009-11-02
description: updated
Robert Chalmas (robert-chalmas) wrote :

I also have this problem on my laptop running Karmic with all updates available as of November 16th.

If I put those 3 lines in /etc/gdm/PostLogin/Default:

echo $USER > /tmp/aaa.txt
echo $USERNAME >> /tmp/aaa.txt
echo $LOGNAME >> /tmp/aaa.txt

after every login I get this result:

$ cat /tmp/aaa.txt

I would expect to get my real login name in those 3 variables instead of "gdm", which is of no use to take specific action based on which user is logging in. This was working as expected with at least the 3 previous versions of Ubuntu.

Zoltan Tesch (clamav) wrote :

This is not an Ubuntu bug but a gdm bug.
The following

Zoltan Tesch (clamav) wrote :

I have just missed the last sentence...
So you have to patch daemon/gdm-simple-slave.c with the following commands:
# cd gdm-2.26/daemon
# patch gdm-simple-slave.c <use the path of the attached patch>

Recompile and re-install gdm
Maybe it works with newer versions of gdm...

As Zoltan Tesch indicated, this is not a general Ubuntu bug, but instead an issue with GDM.

affects: ubuntu → gdm (Ubuntu)
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. The issue is an upstream one and it would be nice if somebody having it could send the bug the to the people writting the software (

Changed in gdm (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Low
Sebastien Bacher (seb128) wrote :

You might want to subscribe ubuntu-main-sponsors if you want it reviewed for upload in ubuntu too

Sebastien Bacher (seb128) wrote :

Thank you for sending the bug to GNOME

Changed in gdm (Ubuntu):
status: New → Triaged
Sebastien Bacher (seb128) wrote :

upstream duplicated the bug from one which is fixed in lucid, closing as fixed, you can reopen if you still get the bug on lucid though

Changed in gdm (Ubuntu):
status: Triaged → Fix Released
ericlesoll (ericlesoll) wrote :

I confirm that the bug is fixed in Lucid, I tried on Lucid alpha3. Thanks a lot for the work.

edu jose (pepinmore) wrote :

Err, this bug still happens in Karmic, though it's been fixed for Lucid. It was a regression from Intrepid, where things worked fine.

It would be awesome if you could backport the fix to Karmic (I know time is tight now with Lucid being near release time, maybe after release).

(Don't know if it's appropiate to comment in a fix-commited bug though, sorry for any inconveniences.)

edu jose (pepinmore) wrote :

Hi, the fix for Lucid has been backported to Karmic thanks to Artur Rona.

You can test the fix by following the instructions in comment #8 of bug #574262.

It works for me (tested on two machines running Karmic, one upgraded from Jaunty, another with a fresh Karmic install).

Changed in gdm:
importance: Unknown → High
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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