Re: Grey screen of death?



Here's a patch that would have saved me a lot of time when faced with the GSOD
It's against gnome-core 1.0.3 

Richard Cohen.



diff -u -r old/gnome-core-1.0.3/gsm/save.c new/gnome-core-1.0.3/gsm/save.c
--- old/gnome-core-1.0.3/gsm/save.c	Thu Mar 25 10:29:38 1999
+++ new/gnome-core-1.0.3/gsm/save.c	Thu Mar 25 10:25:01 1999
@@ -24,9 +24,9 @@
 
 #include "libgnome/libgnome.h"
 #include "libgnomeui/gnome-client.h"
+#include "libgnomeui/gnome-dialog-util.h"
 #include "manager.h"
 #include "session.h"
-
 
 
 /* Used to save xsm style string valued SmDiscardCommand properties. */
@@ -447,6 +447,23 @@
     }
   g_free (last);
 
+  if (!list)
+    {
+      GtkWidget *d, *l;
+      d = gnome_warning_dialog(_("Gnome Session Manager"));
+      
+      l = gtk_label_new(_("Unable to read any session configuration information from the \n"
+			  "default session file ("DEFAULT_SESSION_FILE").\n"
+			  "Please check that this file exists and is readable.\n"));
+      gtk_widget_show(l);
+      gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(d)->vbox), l, TRUE, TRUE, 5);
+      gnome_dialog_run(GNOME_DIALOG(d));
+
+      /* FIXME Should maybe run the new "choose wm" capplet ? ...
+       * FIXME ...or do what default.session would have done ?
+       */
+      gtk_exit(1);
+    }
   session->client_list = list;
   return session;
 }
diff -u -r old/gnome-core-1.0.3/gsm/session.h new/gnome-core-1.0.3/gsm/session.h
--- old/gnome-core-1.0.3/gsm/session.h	Thu Mar 25 10:29:38 1999
+++ new/gnome-core-1.0.3/gsm/session.h	Thu Mar 25 09:55:44 1999
@@ -155,9 +155,11 @@
  * Sessions are also freed when GsmStartSession is called or when the client
  * which read the session disconnects or dies. */
 
+/* Name of the default session file */
+#define DEFAULT_SESSION_FILE  DEFAULTDIR "/default.session"
 
 /* Config prefix used to store the sysadmin's default sessions. */
-#define DEFAULT_CONFIG_PREFIX "=" DEFAULTDIR "/default.session=/"
+#define DEFAULT_CONFIG_PREFIX "=" DEFAULT_SESSION_FILE "=/"
 
 /* Config prefix used to store the users' sessions. */
 #define CONFIG_PREFIX "session/"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]