summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/gdm-settings-keys.h1
-rw-r--r--daemon/gdm-manager.c26
-rw-r--r--daemon/gdm-manager.h2
-rw-r--r--daemon/main.c5
-rw-r--r--data/gdm.schemas.in.in5
5 files changed, 35 insertions, 4 deletions
diff --git a/common/gdm-settings-keys.h b/common/gdm-settings-keys.h
index 6e506219..f4dcca2e 100644
--- a/common/gdm-settings-keys.h
+++ b/common/gdm-settings-keys.h
@@ -43,6 +43,7 @@ G_BEGIN_DECLS
#define GDM_KEY_DISALLOW_TCP "security/DisallowTCP"
#define GDM_KEY_XDMCP_ENABLE "xdmcp/Enable"
+#define GDM_KEY_SHOW_LOCAL_GREETER "xdmcp/ShowLocalGreeter"
#define GDM_KEY_MAX_PENDING "xdmcp/MaxPending"
#define GDM_KEY_MAX_SESSIONS "xdmcp/MaxSessions"
#define GDM_KEY_MAX_WAIT "xdmcp/MaxWait"
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index ad0ac63f..5108c374 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -65,7 +65,7 @@ struct GdmManagerPrivate
gboolean started;
gboolean wait_for_go;
- gboolean no_console;
+ gboolean show_local_greeter;
GDBusProxy *bus_proxy;
GDBusConnection *connection;
@@ -74,7 +74,8 @@ struct GdmManagerPrivate
enum {
PROP_0,
- PROP_XDMCP_ENABLED
+ PROP_XDMCP_ENABLED,
+ PROP_SHOW_LOCAL_GREETER
};
enum {
@@ -544,7 +545,7 @@ gdm_manager_start (GdmManager *manager)
{
g_debug ("GdmManager: GDM starting to manage displays");
- if (! manager->priv->wait_for_go) {
+ if (! manager->priv->wait_for_go && (!manager->priv->xdmcp_enabled || manager->priv->show_local_greeter)) {
gdm_display_factory_start (GDM_DISPLAY_FACTORY (manager->priv->local_factory));
}
@@ -570,7 +571,9 @@ gdm_manager_set_wait_for_go (GdmManager *manager,
if (! wait_for_go) {
/* we got a go */
- gdm_display_factory_start (GDM_DISPLAY_FACTORY (manager->priv->local_factory));
+ if (!manager->priv->xdmcp_enabled || manager->priv->show_local_greeter) {
+ gdm_display_factory_start (GDM_DISPLAY_FACTORY (manager->priv->local_factory));
+ }
#ifdef HAVE_LIBXDMCP
if (manager->priv->xdmcp_enabled && manager->priv->xdmcp_factory != NULL) {
@@ -643,6 +646,15 @@ gdm_manager_set_xdmcp_enabled (GdmManager *manager,
}
+void
+gdm_manager_set_show_local_greeter (GdmManager *manager,
+ gboolean show_local_greeter)
+{
+ g_return_if_fail (GDM_IS_MANAGER (manager));
+
+ manager->priv->show_local_greeter = show_local_greeter;
+}
+
static void
gdm_manager_set_property (GObject *object,
guint prop_id,
@@ -657,6 +669,9 @@ gdm_manager_set_property (GObject *object,
case PROP_XDMCP_ENABLED:
gdm_manager_set_xdmcp_enabled (self, g_value_get_boolean (value));
break;
+ case PROP_SHOW_LOCAL_GREETER:
+ gdm_manager_set_show_local_greeter (self, g_value_get_boolean (value));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -677,6 +692,9 @@ gdm_manager_get_property (GObject *object,
case PROP_XDMCP_ENABLED:
g_value_set_boolean (value, self->priv->xdmcp_enabled);
break;
+ case PROP_SHOW_LOCAL_GREETER:
+ g_value_set_boolean (value, self->priv->show_local_greeter);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
diff --git a/daemon/gdm-manager.h b/daemon/gdm-manager.h
index 3ee550f9..4482bdd1 100644
--- a/daemon/gdm-manager.h
+++ b/daemon/gdm-manager.h
@@ -71,6 +71,8 @@ void gdm_manager_set_wait_for_go (GdmManager *mana
void gdm_manager_set_xdmcp_enabled (GdmManager *manager,
gboolean enabled);
+void gdm_manager_set_show_local_greeter (GdmManager *manager,
+ gboolean show_local_greeter);
gboolean gdm_manager_get_displays (GdmManager *manager,
GPtrArray **displays,
GError **error);
diff --git a/daemon/main.c b/daemon/main.c
index 43625d6a..7bd342d0 100644
--- a/daemon/main.c
+++ b/daemon/main.c
@@ -440,6 +440,7 @@ on_name_acquired (GDBusConnection *bus,
gpointer user_data)
{
gboolean xdmcp_enabled;
+ gboolean show_local_greeter;
manager = gdm_manager_new ();
if (manager == NULL) {
@@ -451,6 +452,10 @@ on_name_acquired (GDBusConnection *bus,
gdm_manager_start (manager);
+ show_local_greeter = TRUE;
+ gdm_settings_direct_get_boolean (GDM_KEY_SHOW_LOCAL_GREETER, &show_local_greeter);
+ gdm_manager_set_show_local_greeter (manager, show_local_greeter);
+
xdmcp_enabled = FALSE;
gdm_settings_direct_get_boolean (GDM_KEY_XDMCP_ENABLE, &xdmcp_enabled);
gdm_manager_set_xdmcp_enabled (manager, xdmcp_enabled);
diff --git a/data/gdm.schemas.in.in b/data/gdm.schemas.in.in
index 3c831258..4278b06d 100644
--- a/data/gdm.schemas.in.in
+++ b/data/gdm.schemas.in.in
@@ -70,6 +70,11 @@
<default>false</default>
</schema>
<schema>
+ <key>xdmcp/ShowLocalGreeter</key>
+ <signature>b</signature>
+ <default>true</default>
+ </schema>
+ <schema>
<key>xdmcp/MaxPending</key>
<signature>i</signature>
<default>4</default>