Index: gdm-2.24.0/common/gdm-settings-keys.h
===================================================================
--- gdm-2.24.0.orig/common/gdm-settings-keys.h
+++ gdm-2.24.0/common/gdm-settings-keys.h
@@ -32,7 +32,7 @@ G_BEGIN_DECLS
 #define GDM_KEY_TIMED_LOGIN_ENABLE "daemon/TimedLoginEnable"
 #define GDM_KEY_TIMED_LOGIN_USER "daemon/TimedLogin"
 #define GDM_KEY_TIMED_LOGIN_DELAY "daemon/TimedLoginDelay"
-
+#define GDM_KEY_LOCAL_XSERVER_ENABLE "daemon/LocalXserverEnable"
 #define GDM_KEY_DISALLOW_TCP "security/DisallowTCP"
 
 #define GDM_KEY_XDMCP_ENABLE "xdmcp/Enable"
Index: gdm-2.24.0/common/gdm-settings-system-backend.c
===================================================================
--- gdm-2.24.0.orig/common/gdm-settings-system-backend.c
+++ gdm-2.24.0/common/gdm-settings-system-backend.c
@@ -42,6 +42,7 @@
 #include "gdm-log.h"
 
 #define SYSCONFIG_AUTOLOGIN_KEY "DISPLAYMANAGER_AUTOLOGIN"
+#define SYSCONFIG_LOCAL_XSERVER_KEY "DISPLAYMANAGER_STARTS_XSERVER"
 
 #define GDM_SETTINGS_SYSTEM_BACKEND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDM_TYPE_SETTINGS_SYSTEM_BACKEND, GdmSettingsSystemBackendPrivate))
 
@@ -84,12 +85,24 @@ gdm_settings_system_backend_get_value (G
         }
 
         if (strcasecmp (key, GDM_KEY_AUTO_LOGIN_ENABLE) &&
-            strcasecmp (key, GDM_KEY_AUTO_LOGIN_USER)) {
+            strcasecmp (key, GDM_KEY_AUTO_LOGIN_USER) && 
+	    strcasecmp (key, GDM_KEY_LOCAL_XSERVER_ENABLE)) {
                 g_set_error (error, GDM_SETTINGS_BACKEND_ERROR, GDM_SETTINGS_BACKEND_ERROR_KEY_NOT_FOUND, "Key not found");
                 goto out;
         }
+	if (!strcasecmp (key, GDM_KEY_LOCAL_XSERVER_ENABLE)) {
+		const gchar *new_val;
 
-        if (!strcasecmp (key, GDM_KEY_AUTO_LOGIN_ENABLE)) {
+		val = gdm_sysconfig_get_value ((const gchar **) priv->lines, SYSCONFIG_LOCAL_XSERVER_KEY);
+		/* default value is Yes */
+		if (val && !strcasecmp (val, "no"))
+			new_val = "false";
+		else
+			new_val = "true";
+		if (val)
+			g_free (val);
+                val = g_strdup (new_val);
+	} else if (!strcasecmp (key, GDM_KEY_AUTO_LOGIN_ENABLE)) {
                 if (priv->dirty) {
                         val = g_strdup (priv->set_autologin_enabled ? "true" : "false");
                 } else {
Index: gdm-2.24.0/daemon/gdm-manager.c
===================================================================
--- gdm-2.24.0.orig/daemon/gdm-manager.c
+++ gdm-2.24.0/daemon/gdm-manager.c
@@ -60,6 +60,7 @@ struct GdmManagerPrivate
         GdmXdmcpDisplayFactory *xdmcp_factory;
 #endif
         gboolean                xdmcp_enabled;
+	gboolean		local_enabled;
 
         gboolean                started;
         gboolean                wait_for_go;
@@ -71,6 +72,7 @@ struct GdmManagerPrivate
 
 enum {
         PROP_0,
+	PROP_LOCAL_ENABLED,
         PROP_XDMCP_ENABLED
 };
 
@@ -161,8 +163,9 @@ gdm_manager_start (GdmManager *manager)
 {
         g_debug ("GdmManager: GDM starting to manage displays");
 
-        if (! manager->priv->wait_for_go) {
-                gdm_display_factory_start (GDM_DISPLAY_FACTORY (manager->priv->local_factory));
+        if (manager->priv->local_enabled && ! manager->priv->wait_for_go) {
+		if (manager->priv->local_factory != NULL)
+	                gdm_display_factory_start (GDM_DISPLAY_FACTORY (manager->priv->local_factory));
         }
 
 #ifdef HAVE_LIBXDMCP
@@ -187,7 +190,9 @@ gdm_manager_set_wait_for_go (GdmManager
 
                 if (! wait_for_go) {
                         /* we got a go */
-                        gdm_display_factory_start (GDM_DISPLAY_FACTORY (manager->priv->local_factory));
+			if (manager->priv->local_enabled && manager->priv->local_factory != NULL) {
+                       		gdm_display_factory_start (GDM_DISPLAY_FACTORY (manager->priv->local_factory));
+			}
 
 #ifdef HAVE_LIBXDMCP
                         if (manager->priv->xdmcp_enabled && manager->priv->xdmcp_factory != NULL) {
@@ -287,6 +292,15 @@ register_manager (GdmManager *manager)
 }
 
 void
+gdm_manager_set_local_enabled (GdmManager *manager,
+		gboolean    enabled)
+{
+	g_return_if_fail (GDM_IS_MANAGER (manager));
+	
+	manager->priv->local_enabled = enabled;
+}
+
+void
 gdm_manager_set_xdmcp_enabled (GdmManager *manager,
                                gboolean    enabled)
 {
@@ -326,6 +340,9 @@ gdm_manager_set_property (GObject      *
         case PROP_XDMCP_ENABLED:
                 gdm_manager_set_xdmcp_enabled (self, g_value_get_boolean (value));
                 break;
+	case PROP_LOCAL_ENABLED:
+		gdm_manager_set_local_enabled (self, g_value_get_boolean (value));
+		break;
         default:
                 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
                 break;
@@ -346,6 +363,9 @@ gdm_manager_get_property (GObject    *ob
         case PROP_XDMCP_ENABLED:
                 g_value_set_boolean (value, self->priv->xdmcp_enabled);
                 break;
+	case PROP_LOCAL_ENABLED:
+		g_value_set_boolean (value, self->priv->local_enabled);
+		break;
         default:
                 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
                 break;
@@ -406,6 +426,14 @@ gdm_manager_class_init (GdmManagerClass
                               1, G_TYPE_STRING);
 
         g_object_class_install_property (object_class,
+                                         PROP_LOCAL_ENABLED,
+                                         g_param_spec_boolean ("local-enabled",
+                                                               NULL,
+                                                               NULL,
+                                                               TRUE,
+                                                               G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+
+        g_object_class_install_property (object_class,
                                          PROP_XDMCP_ENABLED,
                                          g_param_spec_boolean ("xdmcp-enabled",
                                                                NULL,
Index: gdm-2.24.0/daemon/main.c
===================================================================
--- gdm-2.24.0.orig/daemon/main.c
+++ gdm-2.24.0/daemon/main.c
@@ -506,6 +506,7 @@ main (int    argc,
         GError             *error;
         int                 ret;
         gboolean            res;
+	gboolean 	    local_enabled;
         gboolean            xdmcp_enabled;
         GdmSignalHandler   *signal_handler;
         static gboolean     debug            = FALSE;
@@ -612,6 +613,10 @@ main (int    argc,
         gdm_settings_direct_get_boolean (GDM_KEY_XDMCP_ENABLE, &xdmcp_enabled);
         gdm_manager_set_xdmcp_enabled (manager, xdmcp_enabled);
 
+	local_enabled = TRUE;
+        gdm_settings_direct_get_boolean (GDM_KEY_LOCAL_XSERVER_ENABLE, &local_enabled);
+        gdm_manager_set_local_enabled (manager, local_enabled);
+
         g_signal_connect (bus_proxy,
                           "destroy",
                           G_CALLBACK (bus_proxy_destroyed_cb),
Index: gdm-2.24.0/data/gdm.schemas
===================================================================
--- gdm-2.24.0.orig/data/gdm.schemas
+++ gdm-2.24.0/data/gdm.schemas
@@ -12,6 +12,11 @@
       <default>gdm</default>
     </schema>
     <schema>
+      <key>daemon/LocalXserverEnable</key>
+      <signature>b</signature>
+      <default>true</default>
+    </schema>
+    <schema>
       <key>daemon/AutomaticLoginEnable</key>
       <signature>b</signature>
       <default>false</default>
Index: gdm-2.24.0/data/gdm.schemas.in
===================================================================
--- gdm-2.24.0.orig/data/gdm.schemas.in
+++ gdm-2.24.0/data/gdm.schemas.in
@@ -12,6 +12,11 @@
       <default>gdm</default>
     </schema>
     <schema>
+      <key>daemon/LocalXserverEnable</key>
+      <signature>b</signature>
+      <default>true</default>
+    </schema>
+    <schema>
       <key>daemon/AutomaticLoginEnable</key>
       <signature>b</signature>
       <default>false</default>
Index: gdm-2.24.0/data/gdm.schemas.in.in
===================================================================
--- gdm-2.24.0.orig/data/gdm.schemas.in.in
+++ gdm-2.24.0/data/gdm.schemas.in.in
@@ -12,6 +12,11 @@
       <default>@GDM_GROUPNAME@</default>
     </schema>
     <schema>
+      <key>daemon/LocalXserverEnable</key>
+      <signature>b</signature>
+      <default>true</default>
+    </schema>
+    <schema>
       <key>daemon/AutomaticLoginEnable</key>
       <signature>b</signature>
       <default>false</default>
