diff -up -ru galeon-2.0.7.orig/src/galeon-main.c galeon-2.0.7/src/galeon-main.c
--- galeon-2.0.7.orig/src/galeon-main.c	2009-07-09 16:07:47.000000000 +0200
+++ galeon-2.0.7/src/galeon-main.c	2009-07-11 18:34:59.000000000 +0200
@@ -31,6 +31,7 @@
 #include "gul-x11.h"
 #include "hig-alert.h"
 #include "GaleonAutomation.h"
+#include "session.h"
 
 #include <libbonoboui.h>
 #include <libgnome/gnome-program.h>
@@ -379,8 +380,17 @@ galeon_main_start (guint32 user_time)
 	/* load the session if requested */
 	if (session_filename)
 	{
-		GNOME_GaleonAutomation_loadSessionWithStartupId
-			(gaserver, session_filename, user_time, &corba_env);
+		if (user_time)
+		{
+			GNOME_GaleonAutomation_loadSessionWithStartupId
+			  	(gaserver, session_filename, user_time, &corba_env);
+		}
+		else
+		{
+			/* No factory, let session_autoresume() handle it */
+			set_gnome_session_filename(session_filename);
+		}
+		
 	}
 	/* if found and we're given a bookmark to add... */
 	else if (bookmark_url != NULL)
diff -up -ru galeon-2.0.7.orig/src/session.c galeon-2.0.7/src/session.c
--- galeon-2.0.7.orig/src/session.c	2008-07-04 18:30:50.000000000 +0200
+++ galeon-2.0.7/src/session.c	2009-07-11 18:40:35.000000000 +0200
@@ -66,6 +66,7 @@ static void session_dispose (GObject *ob
 static void session_create_bookmarks (Session *session, const char *filename);
 
 static GObjectClass *parent_class = NULL;
+static gchar *gnome_session_filename = NULL;   /* the GNOME session filename */
 
 #define SESSION_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), \
 				       TYPE_SESSION, SessionPrivate))
@@ -163,6 +164,17 @@ session_class_init (SessionClass *klass)
 	g_type_class_add_private (klass, sizeof (SessionPrivate));
 }
 
+void
+set_gnome_session_filename (const char *filename)
+{
+	if (gnome_session_filename)
+	{
+		g_free (gnome_session_filename);
+	}
+
+	gnome_session_filename = g_strdup (filename);
+}
+
 static char *
 get_session_filename (const char *filename)
 {
@@ -186,15 +198,7 @@ get_session_filename (const char *filena
 	}
 	else if (strcmp (filename, SESSION_GNOME) == 0)
 	{
-		char *tmp;
-		
-		save_to = g_build_filename (g_get_home_dir (),
-					    GALEON_DIR,
-					    "session_gnome-XXXXXX",
-					    NULL);
-		tmp = gul_general_tmp_filename (save_to, "xml");
-		g_free (save_to);
-		save_to = tmp;
+		save_to = g_strdup (gnome_session_filename);
 	}
 	else
 	{
@@ -290,16 +294,34 @@ session_autoresume (Session *session)
 
 	g_free (saved_session);
 
-	saved_session = get_session_filename (SESSION_SAVED);
-
-	if (g_file_test (saved_session, G_FILE_TEST_EXISTS) 
-	    && !loaded
-	    && eel_gconf_get_boolean (CONF_GENERAL_ALWAYS_SAVE_SESSION))
+	if (!loaded)
 	{
-		session_load (session, saved_session, 0u);
+		saved_session = get_session_filename (SESSION_GNOME);
+
+		if (saved_session)
+		{
+			if (g_file_test (saved_session, G_FILE_TEST_EXISTS))
+			{
+				session_load (session, saved_session, 0u);
+				loaded = TRUE;
+			}
+	
+			g_free (saved_session);
+		}
 	}
+
+	if (!loaded)
+	{
+		saved_session = get_session_filename (SESSION_SAVED);
+
+		if (g_file_test (saved_session, G_FILE_TEST_EXISTS) 
+		    && eel_gconf_get_boolean (CONF_GENERAL_ALWAYS_SAVE_SESSION))
+		{
+			session_load (session, saved_session, 0u);
+		}
 	
-	g_free (saved_session);
+		g_free (saved_session);
+	}
 
 	/* return SESSION_RESUMED, if a window was opened, else SESSION_OK */
 	return (session->priv->windows != NULL) ? SESSION_RESUMED : SESSION_OK;
@@ -327,6 +349,21 @@ save_yourself_cb  (GnomeClient *client,
 	if (session_get_windows (session))
 	{
 		session_file = get_session_filename (SESSION_GNOME);
+
+		if (!session_file)
+		{
+			char *tmp;
+
+			session_file = g_build_filename (g_get_home_dir (),
+							 GALEON_DIR,
+							 "session_gnome-XXXXXX",
+							 NULL);
+			tmp = gul_general_tmp_filename (session_file, "xml");
+			g_free (session_file);
+			session_file = tmp;
+			set_gnome_session_filename (session_file);
+		}
+
 		discard_argv[2] = session_file;
 		gnome_client_set_discard_command (client, 3, discard_argv);
 
diff -up -ru galeon-2.0.7.orig/src/session.h galeon-2.0.7/src/session.h
--- galeon-2.0.7.orig/src/session.h	2008-07-04 18:30:50.000000000 +0200
+++ galeon-2.0.7/src/session.h	2009-07-11 18:40:58.000000000 +0200
@@ -77,6 +77,8 @@ void	      session_load     		(Session *
 void	      session_save     		(Session *session,
 					 const char *filename);
 
+void	      set_gnome_session_filename (const char *filename);
+
 SessionResumeType session_autoresume   	(Session *session);
 
 GList	     *session_get_windows     	(Session *session);
