[pkg-fso-maint] Bug#525908: Bug#525908: Missing $SHELL variable is the problem

Joachim Breitner nomeata at debian.org
Tue May 12 22:11:28 UTC 2009


Hi,

Am Mittwoch, den 13.05.2009, 00:43 +0300 schrieb Andrei Popescu:
> > This leads to the question whether nodm should clean it’s environment,
> > and it probably should – again, help would be appreciated in seeing what
> > xdm or gdm do: What of their environment do they retain, what do they
> > delete and what do they actively set.
> 
> I'm running gdm with autologin and the environment is setup correctly on 
> the first start.

looking at ./daemon/slave.c in the gdm sources, I think the interesting
function is session_child_run. Among other stuff, it contains these
lines:
        /* Prepare user session */
        g_setenv ("XAUTHORITY", d->userauth, TRUE);
        g_setenv ("DISPLAY", d->name, TRUE);
        if (d->windowpath)
                g_setenv ("WINDOWPATH", d->windowpath, TRUE);
        g_setenv ("LOGNAME", pwent->pw_name, TRUE);
        g_setenv ("USER", pwent->pw_name, TRUE);
        g_setenv ("USERNAME", pwent->pw_name, TRUE);
        g_setenv ("HOME", home_dir, TRUE);
#ifdef WITH_CONSOLE_KIT
        if (ck_session_cookie != NULL) {
                g_setenv ("XDG_SESSION_COOKIE", ck_session_cookie, TRUE);
        }
#endif
        g_setenv ("PWD", home_dir, TRUE);
        g_setenv ("GDMSESSION", session, TRUE);
        g_setenv ("DESKTOP_SESSION", session, TRUE);
        g_setenv ("SHELL", pwent->pw_shell, TRUE);
[..]
        /* Special PATH for root */
        if (pwent->pw_uid == 0)
                g_setenv ("PATH", gdm_daemon_config_get_value_string (GDM_KEY_ROOT_PATH), TRUE);
        else
                g_setenv ("PATH", gdm_daemon_config_get_value_string (GDM_KEY_PATH), TRUE);


Andrei, could you check which of these environment variables are missing
a sensible value in a nodm session started at system start?

Enrico, I guess this code gives a good guidance as to what do do WRT
session setup in nodm. Are you going to take care of that?

Thanks,
Joachim

-- 
Joachim "nomeata" Breitner
Debian Developer
  nomeata at debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nomeata at joachim-breitner.de | http://people.debian.org/~nomeata
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://lists.alioth.debian.org/pipermail/pkg-fso-maint/attachments/20090513/851915ad/attachment.pgp>


More information about the pkg-fso-maint mailing list