It is gdm's fault. It seems to be gdm-simple-slave's fault via the code below. If you comment out the code below, it works as expected.
daemon/gdm-session-direct.c:
/* FIXME: We do this here and in the session worker. We should consolidate * somehow. */
gdm_session_direct_set_environment_variable (session, "PATH", strcmp (BINDIR, "/usr/bin") == 0? GDM_SESSION_DEFAULT_PATH : BINDIR ":" GDM_SESSION_DEFAULT_PATH);
It is gdm's fault. It seems to be gdm-simple-slave's fault via the code below. If you comment out the code below, it works as expected.
daemon/ gdm-session- direct. c:
/* FIXME: We do this here and in the session worker. We should consolidate
* somehow.
*/