--- gdm-2.27.90/data/gconf.path-orig	2009-09-10 16:34:31.917244215 -0500
+++ gdm-2.27.90/data/gconf.path	2009-09-10 16:36:23.933184727 -0500
@@ -7,3 +7,6 @@
 # owned by GDM.  Sysadmins should create
 # another source if they wish to override them.
 xml:readonly:$(HOME)/.gconf.mandatory
+
+# Set per-seat configuration directory
+xml:readwrite:$(HOME)/$(ENV_GDM_SEAT_ID)/.gconf
--- gdm-2.27.90/daemon/gdm-welcome-session.c-orig	2009-09-10 16:05:51.098415299 -0500
+++ gdm-2.27.90/daemon/gdm-welcome-session.c	2009-09-10 16:33:59.605442594 -0500
@@ -339,6 +339,12 @@ get_welcome_environment (GdmWelcomeSessi
                 g_hash_table_insert (hash, g_strdup ("SHELL"), g_strdup (pwent->pw_shell));
         }
 
+        if (welcome_session->priv->x11_display_seat_id != NULL) {
+                const char *seat_id;
+                seat_id = welcome_session->priv->x11_display_seat_id +
+                        strlen ("/org/freedesktop/ConsoleKit/");
+                g_hash_table_insert (hash, g_strdup ("GDM_SEAT_ID"), g_strdup (seat_id));
+        }
 
         g_hash_table_insert (hash, g_strdup ("PATH"), g_strdup (g_getenv ("PATH")));
 
@@ -433,6 +439,7 @@ typedef struct {
         const char *user_name;
         const char *group_name;
         const char *log_file;
+        const char *seat_id;
 } SpawnChildData;
 
 static void
@@ -459,6 +466,26 @@ spawn_child_setup (SpawnChildData *data)
                 _exit (1);
         }
 
+        if (pwent->pw_dir != NULL) {
+                struct stat statbuf;
+                const char *seat_id;
+                char       *gconf_dir;
+                int         r;
+
+                seat_id = data->seat_id + strlen ("/org/freedesktop/ConsoleKit/");
+                gconf_dir = g_strdup_printf ("%s/%s", pwent->pw_dir, seat_id);
+
+                /* Verify per-seat gconf directory exists, create if needed */
+                r = g_stat (gconf_dir, &statbuf);
+                if (r < 0) {
+                        g_debug ("Making per-seat gconf directory %s", gconf_dir);
+                        g_mkdir (gconf_dir, S_IRWXU | S_IXGRP | S_IRGRP);
+                        g_chmod (gconf_dir, S_IRWXU | S_IXGRP | S_IRGRP);
+                        chown (gconf_dir, pwent->pw_uid, grent->gr_gid);
+                }
+                g_free (gconf_dir);
+        }
+
         g_debug ("GdmWelcomeSession: Changing (uid:gid) for child process to (%d:%d)",
                  pwent->pw_uid,
                  grent->gr_gid);
@@ -520,6 +547,7 @@ static gboolean
 spawn_command_line_sync_as_user (const char *command_line,
                                  const char *user_name,
                                  const char *group_name,
+                                 const char *seat_id,
                                  const char *log_file,
                                  char       **env,
                                  char       **std_output,
@@ -546,6 +574,7 @@ spawn_command_line_sync_as_user (const c
         data.user_name = user_name;
         data.group_name = group_name;
         data.log_file = log_file;
+        data.seat_id = seat_id;
 
         local_error = NULL;
         res = g_spawn_sync (NULL,
@@ -576,6 +605,7 @@ static gboolean
 spawn_command_line_async_as_user (const char *command_line,
                                   const char *user_name,
                                   const char *group_name,
+                                  const char *seat_id,
                                   const char *log_file,
                                   char      **env,
                                   GPid       *child_pid,
@@ -600,6 +630,7 @@ spawn_command_line_async_as_user (const 
         data.user_name = user_name;
         data.group_name = group_name;
         data.log_file = log_file;
+        data.seat_id = seat_id;
 
         local_error = NULL;
         res = g_spawn_async (NULL,
@@ -718,6 +749,7 @@ start_dbus_daemon (GdmWelcomeSession *we
         res = spawn_command_line_sync_as_user (DBUS_LAUNCH_COMMAND,
                                                welcome_session->priv->user_name,
                                                welcome_session->priv->group_name,
+                                               welcome_session->priv->x11_display_seat_id,
                                                NULL, /* log file */
                                                (char **)env->pdata,
                                                &std_out,
@@ -780,6 +812,7 @@ gdm_welcome_session_spawn (GdmWelcomeSes
         ret = spawn_command_line_async_as_user (welcome_session->priv->command,
                                                 welcome_session->priv->user_name,
                                                 welcome_session->priv->group_name,
+                                                welcome_session->priv->x11_display_seat_id,
                                                 log_path,
                                                 (char **)env->pdata,
                                                 &welcome_session->priv->pid,
