diff --git a/configure.ac b/configure.ac
index 8818a3e..d879750 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1312,21 +1312,6 @@ AC_DEFINE_UNQUOTED(XSESSION_SHELL,"$XSESSION_SHELL",[xsession shell])
 AC_SUBST(SOUND_PROGRAM)
 AC_DEFINE_UNQUOTED(SOUND_PROGRAM,"$SOUND_PROGRAM",[])
 
-AC_SUBST(X_PATH)
-AC_SUBST(X_SERVER)
-AC_SUBST(X_SERVER_PATH)
-AC_SUBST(X_CONFIG_OPTIONS)
-AC_DEFINE_UNQUOTED(X_SERVER,"$X_SERVER",[])
-AC_DEFINE_UNQUOTED(X_SERVER_PATH,"$X_SERVER_PATH",[])
-AC_DEFINE_UNQUOTED(X_CONFIG_OPTIONS,"$X_CONFIG_OPTIONS", [Options used when launching xserver])
-
-AC_SUBST(X_XNEST_CMD)
-AC_SUBST(X_XNEST_CONFIG_OPTIONS)
-AC_SUBST(X_XNEST_UNSCALED_FONTPATH)
-AC_DEFINE_UNQUOTED(X_XNEST_CMD,"$X_XNEST_CMD",[])
-AC_DEFINE_UNQUOTED(X_XNEST_CONFIG_OPTIONS,"$X_XNEST_CONFIG_OPTIONS",[])
-AC_DEFINE_UNQUOTED(X_XNEST_UNSCALED_FONTPATH,"$X_XNEST_UNSCALED_FONTPATH",[])
-
 ## Stuff for debian/changelog.in
 #if test -e "debian/changelog"; then
 #  DEBIAN_DATESTAMP=`head -1 debian/changelog| sed -e 's/.*cvs.//' -e 's/).*//'`
@@ -1393,7 +1378,6 @@ echo "
 
         dbus-1 system.d dir:      ${DBUS_SYS_DIR}
         PAM prefix:               ${PAM_PREFIX}
-        X server:                 ${X_SERVER}
 "
 
 dnl TCP Wrappers support?
diff --git a/daemon/gdm-simple-slave.c b/daemon/gdm-simple-slave.c
index b59976d..b94c84d 100644
--- a/daemon/gdm-simple-slave.c
+++ b/daemon/gdm-simple-slave.c
@@ -339,6 +339,8 @@ try_migrate_session (GdmSimpleSlave *slave)
 static void
 stop_greeter (GdmSimpleSlave *slave)
 {
+        char *username;
+
         g_debug ("GdmSimpleSlave: Stopping greeter");
 
         if (slave->priv->greeter == NULL) {
@@ -347,7 +349,12 @@ stop_greeter (GdmSimpleSlave *slave)
         }
 
         /* Run the PostLogin script. gdmslave suspends until script has terminated */
-        gdm_slave_run_script (GDM_SLAVE (slave), GDMCONFDIR "/PostLogin", GDM_USERNAME);
+        username = gdm_session_direct_get_username (slave->priv->session);
+        g_debug ("GdmSimpleGreeter: run script %s for %s", GDMCONFDIR "/PostLogin", username);
+        if (username)
+                gdm_slave_run_script (GDM_SLAVE (slave), GDMCONFDIR "/PostLogin", username);
+        else
+                gdm_slave_run_script (GDM_SLAVE (slave), GDMCONFDIR "/PostLogin", GDM_USERNAME);
 
         gdm_welcome_session_stop (GDM_WELCOME_SESSION (slave->priv->greeter));
         gdm_greeter_server_stop (slave->priv->greeter_server);
diff --git a/daemon/gdm-slave.c b/daemon/gdm-slave.c
index 9e93d6d..852538f 100644
--- a/daemon/gdm-slave.c
+++ b/daemon/gdm-slave.c
@@ -237,9 +237,7 @@ get_script_environment (GdmSlave   *slave,
         /* Runs as root */
         g_hash_table_insert (hash, g_strdup ("XAUTHORITY"), g_strdup (slave->priv->display_x11_authority_file));
         g_hash_table_insert (hash, g_strdup ("DISPLAY"), g_strdup (slave->priv->display_name));
-
-        /*g_setenv ("PATH", gdm_daemon_config_get_value_string (GDM_KEY_ROOT_PATH), TRUE);*/
-
+        g_hash_table_insert (hash, g_strdup ("PATH"), g_strdup (GDM_SESSION_DEFAULT_PATH));
         g_hash_table_insert (hash, g_strdup ("RUNNING_UNDER_GDM"), g_strdup ("true"));
 
         g_hash_table_remove (hash, "MAIL");
diff --git a/data/Init.in b/data/Init.in
index 091f535..dca63a2 100644
--- a/data/Init.in
+++ b/data/Init.in
@@ -3,7 +3,7 @@
 # Plus a lot of fun stuff added
 #  -George
 
-PATH=@X_PATH@:$PATH
+PATH="@X_PATH@:$PATH"
 OLD_IFS=$IFS
 
 gdmwhich () {
diff --git a/data/Makefile.am b/data/Makefile.am
index d86d268..b3c1c62 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -6,6 +6,8 @@ SUBDIRS =			\
 	pixmaps			\
 	$(NULL)
 
+X_PATH = /usr/X11/bin
+
 initdir = $(gdmconfdir)/Init
 authdir = $(localstatedir)/gdm
 postdir = $(gdmconfdir)/PostSession
diff --git a/data/PreSession.in b/data/PreSession.in
index 6f31d3d..cfabee7 100755
--- a/data/PreSession.in
+++ b/data/PreSession.in
@@ -6,4 +6,4 @@
 #
 # Note that output goes into the .xsession-errors file for easy debugging
 #
-PATH="@X_PATH@:$PATH:/bin:/usr/bin"
+PATH="@X_PATH@:$PATH"
