diff -u gnome-session-2.26.0svn20090408/debian/changelog gnome-session-2.26.0svn20090408/debian/changelog
--- gnome-session-2.26.0svn20090408/debian/changelog
+++ gnome-session-2.26.0svn20090408/debian/changelog
@@ -1,3 +1,9 @@
+gnome-session (2.26.0svn20090408-0ubuntu3) jaunty; urgency=low
+
+  * edited main.c and gsm-manager.c and gsm-manager.h to fix apps continuing to restart
+
+ -- Daniel Hollocher <danielhollocher@gmail.com>  Sun, 27 Sep 2009 11:52:42 -0400
+
 gnome-session (2.26.0svn20090408-0ubuntu2) jaunty; urgency=low
 
   * debian/patches/95_dbus_request_shutdown.patch:
only in patch2:
unchanged:
--- gnome-session-2.26.0svn20090408.orig/gnome-session/gsm-manager.c
+++ gnome-session-2.26.0svn20090408/gnome-session/gsm-manager.c
@@ -141,7 +141,7 @@
 static void     gsm_manager_init        (GsmManager      *manager);
 static void     gsm_manager_finalize    (GObject         *object);
 
-static gboolean auto_save_is_enabled (GsmManager *manager);
+//static gboolean auto_save_is_enabled (GsmManager *manager);
 static void     maybe_save_session   (GsmManager *manager);
 
 static gpointer manager_object = NULL;
@@ -396,7 +396,7 @@
                 start_phase (manager);
                 break;
         case GSM_MANAGER_PHASE_END_SESSION:
-                if (auto_save_is_enabled (manager)) {
+                if (gsm_manager_auto_save_is_enabled (manager)) {
                         maybe_save_session (manager);
                 }
                 manager->priv->phase++;
@@ -584,7 +584,7 @@
         if (manager->priv->forceful_logout) {
                 data.flags |= GSM_CLIENT_END_SESSION_FLAG_FORCEFUL;
         }
-        if (auto_save_is_enabled (manager)) {
+        if (gsm_manager_auto_save_is_enabled (manager)) {
                 data.flags |= GSM_CLIENT_END_SESSION_FLAG_SAVE;
         }
 
@@ -617,7 +617,7 @@
         if (manager->priv->forceful_logout) {
                 data.flags |= GSM_CLIENT_END_SESSION_FLAG_FORCEFUL;
         }
-        if (auto_save_is_enabled (manager)) {
+        if (gsm_manager_auto_save_is_enabled (manager)) {
                 data.flags |= GSM_CLIENT_END_SESSION_FLAG_SAVE;
         }
         data.flags |= GSM_CLIENT_END_SESSION_FLAG_LAST;
@@ -1658,8 +1658,8 @@
         return handled;
 }
 
-static gboolean
-auto_save_is_enabled (GsmManager *manager)
+gboolean
+gsm_manager_auto_save_is_enabled (GsmManager *manager)
 {
         GError   *error;
         gboolean  auto_save;
only in patch2:
unchanged:
--- gnome-session-2.26.0svn20090408.orig/gnome-session/main.c
+++ gnome-session-2.26.0svn20090408/gnome-session/main.c
@@ -274,7 +274,7 @@
         consolekit = gsm_get_consolekit ();
         session_type = gsm_consolekit_get_current_session_type (consolekit);
 
-        if (g_strcmp0 (session_type, GSM_CONSOLEKIT_SESSION_TYPE_LOGIN_WINDOW) != 0) {
+        if (g_strcmp0 (session_type, GSM_CONSOLEKIT_SESSION_TYPE_LOGIN_WINDOW) != 0 && gsm_manager_auto_save_is_enabled(manager) ) {
                 gsm_manager_add_autostart_apps_from_dir (manager, gsm_util_get_saved_session_dir ());
         }
 
only in patch2:
unchanged:
--- gnome-session-2.26.0svn20090408.orig/gnome-session/gsm-manager.h
+++ gnome-session-2.26.0svn20090408/gnome-session/gsm-manager.h
@@ -181,6 +181,8 @@
 gboolean            gsm_manager_set_phase                      (GsmManager     *manager,
                                                                 GsmManagerPhase phase);
 
+gboolean            gsm_manager_auto_save_is_enabled           (GsmManager     *manager);
+
 G_END_DECLS
 
 #endif /* __GSM_MANAGER_H */
