summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Jon McCann <jmccann@redhat.com>2010-06-16 16:32:20 -0400
committerWilliam Jon McCann <jmccann@redhat.com>2010-06-16 16:32:20 -0400
commit64483254bde06c4bec9ea3bd0a01419dba520e36 (patch)
treec91e5681b818b2bc39d17acf513af7dacbfd3fbc
parent1e1cb481ea3df2b9489a4980db2c21eaa73eab2c (diff)
downloadgdm-64483254bde06c4bec9ea3bd0a01419dba520e36.tar.gz
Don't exit when local display fails to start
It doesn't really make a lot of sense to exit when the local display can't be started. Exiting won't leave the system in any better shape that it would be with gdm running in the background. On the other hand it makes it so that XDMCP and other services can't run headless. Ideally we'd have some kind of smart detection of when local hardware is available and when it changes. And smarter fallback code for when the hardware is available but the display can't be started due to some error. https://bugzilla.gnome.org/show_bug.cgi?id=342397
-rw-r--r--daemon/gdm-local-display-factory.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
index 8dc1e9d9..73ab4998 100644
--- a/daemon/gdm-local-display-factory.c
+++ b/daemon/gdm-local-display-factory.c
@@ -311,10 +311,11 @@ on_static_display_status_changed (GdmDisplay *display,
if (factory->priv->num_failures > MAX_DISPLAY_FAILURES) {
/* oh shit */
g_warning ("GdmLocalDisplayFactory: maximum number of X display failures reached: check X server log for errors");
- exit (1);
+ /* FIXME: should monitor hardware changes to
+ try again when seats change */
+ } else {
+ create_display (factory);
}
-
- create_display (factory);
break;
case GDM_DISPLAY_UNMANAGED:
break;
@@ -371,13 +372,17 @@ gdm_local_display_factory_start (GdmDisplayFactory *base_factory)
{
gboolean ret;
GdmLocalDisplayFactory *factory = GDM_LOCAL_DISPLAY_FACTORY (base_factory);
+ GdmDisplay *display;
g_return_val_if_fail (GDM_IS_LOCAL_DISPLAY_FACTORY (factory), FALSE);
ret = TRUE;
/* FIXME: use seat configuration */
- create_display (factory);
+ display = create_display (factory);
+ if (display == NULL) {
+ ret = FALSE;
+ }
return ret;
}