Index: nautilus.desktop.in.in
===================================================================
--- nautilus.desktop.in.in	(revisão 14070)
+++ nautilus.desktop.in.in	(cópia de trabalho)
@@ -14,3 +14,6 @@
 X-GNOME-Bugzilla-Product=nautilus
 X-GNOME-Bugzilla-Component=general
 X-GNOME-Bugzilla-Version=@VERSION@
+X-GNOME-Autostart-Phase=Desktop
+X-GNOME-Provides=desktop
+X-GNOME-Autostart-Notify=true
Index: src/nautilus-main.c
===================================================================
--- src/nautilus-main.c	(revisão 14070)
+++ src/nautilus-main.c	(cópia de trabalho)
@@ -373,7 +373,8 @@
 	gboolean no_default_window;
 	gboolean browser_window;
 	gboolean no_desktop;
-	const char *startup_id;
+	gboolean autostart_mode;
+	const char *startup_id, *autostart_id;
 	char *startup_id_copy;
 	char *session_to_load;
 	gchar *geometry;
@@ -433,6 +434,11 @@
 		g_unsetenv ("DESKTOP_STARTUP_ID");
 	}
 
+	autostart_id = g_getenv ("DESKTOP_AUTOSTART_ID");
+	if (autostart_id != NULL && *autostart_id != '\0') {
+		autostart_mode = TRUE;
+        }
+
 	/* we'll do it ourselves due to complicated factory setup */
 	gtk_window_set_auto_startup_notification (FALSE);
 
@@ -473,6 +479,14 @@
 		no_default_window = TRUE;
 	}
 
+	/* If in autostart mode (aka started by gnome-session), we need to ensure 
+         * nautilus starts with the correct options.
+         */
+	if (autostart_mode) {
+		no_default_window = TRUE;
+		no_desktop = FALSE;
+	}
+
 	/* Do this here so that gdk_display is initialized */
 	if (startup_id_copy == NULL) {
 		/* Create a fake one containing a timestamp that we can use */
