diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2011-08-18 10:11:39 +1000 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2011-08-18 10:11:39 +1000 |
commit | 2b92fb18fe338fef2fd24c27802a4aa52da6bc21 (patch) | |
tree | fda13198e93773c2a923400ceec3dd5e1a077c37 /src/session.c | |
parent | 76456c7ecff931bf1ce8e2c84d1cf56815639363 (diff) | |
parent | 7d31d62b224f7832e6fc78017a97768a984ca926 (diff) | |
download | lightdm-2b92fb18fe338fef2fd24c27802a4aa52da6bc21.tar.gz |
Merge mterrys changes to the PATH mangling for gdmflexiserver
Diffstat (limited to 'src/session.c')
-rw-r--r-- | src/session.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/session.c b/src/session.c index c8d7ca2d..9e9bfad1 100644 --- a/src/session.c +++ b/src/session.c @@ -161,6 +161,7 @@ session_real_start (Session *session) gboolean result; User *user; gchar *absolute_command; + const gchar *orig_path; GError *error = NULL; g_return_val_if_fail (session->priv->authentication != NULL, FALSE); @@ -185,6 +186,19 @@ session_real_start (Session *session) process_set_env (PROCESS (session), "SHELL", user_get_shell (user)); set_env_from_authentication (session, session->priv->authentication); + /* Insert our own utility directory to PATH + * This is to provide gdmflexiserver which provides backwards compatibility with GDM. + * Must be done after set_env_from_authentication because that often sets PATH. + * This can be removed when this is no longer required. + */ + orig_path = process_get_env (PROCESS (session), "PATH"); + if (orig_path) + { + gchar *path = g_strdup_printf ("%s:%s", PKGLIBEXEC_DIR, orig_path); + process_set_env (PROCESS (session), "PATH", path); + g_free (path); + } + if (session->priv->cookie) process_set_env (PROCESS (session), "XDG_SESSION_COOKIE", session->priv->cookie); |