--- ./src/lxdm.c +++ ./src/lxdm.c @@ -1412,7 +1412,7 @@ void lxdm_do_login(struct passwd *pw, char *session, char *lang) path = g_key_file_get_string(config, "base", "path", 0); if( G_UNLIKELY(path) && path[0] ) /* if PATH is specified in config file */ env=g_environ_setenv(env, "PATH", path, TRUE); /* override current $PATH with config value */ - else /* don't use the global env, they are bad for user */ + else if(!getenv("PATH")) /* if PATH is not set */ env=g_environ_setenv(env, "PATH", "/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin", TRUE); /* set proper default */ g_free(path); /* optionally override $LANG, $LC_MESSAGES, and $LANGUAGE */