diff --git a/plugins/status-icon/rb-status-icon-plugin.c b/plugins/status-icon/rb-status-icon-plugin.c
index 5035d94..e949040 100644
--- a/plugins/status-icon/rb-status-icon-plugin.c
+++ b/plugins/status-icon/rb-status-icon-plugin.c
@@ -1000,7 +1000,6 @@ visibility_changing_cb (RBShell *shell,
 			gboolean visible,
 			RBStatusIconPlugin *plugin)
 {
-
 	switch (plugin->priv->icon_mode) {
 	case ICON_NEVER:
 	case ICON_WITH_NOTIFY:
@@ -1016,9 +1015,16 @@ visibility_changing_cb (RBShell *shell,
 	}
 
 	if (initial) {
-		/* restore visibility from gconf setting */
-		visible = eel_gconf_get_boolean (CONF_WINDOW_VISIBILITY) || eel_gconf_is_default (CONF_WINDOW_VISIBILITY);
-		rb_debug ("setting initial visibility %d from gconf", visible);
+		gboolean autostarted;
+		g_object_get (shell, "autostarted", &autostarted, NULL);
+		if (autostarted) {
+			/* restore visibility from gconf setting */
+			visible = eel_gconf_get_boolean (CONF_WINDOW_VISIBILITY) || eel_gconf_is_default (CONF_WINDOW_VISIBILITY);
+			rb_debug ("setting initial visibility %d from gconf", visible);
+		} else {
+			rb_debug ("ignoring stored visibility as we weren't autostarted");
+			visible = TRUE;
+		}
 		return visible;
 	}
 
diff --git a/shell/main.c b/shell/main.c
index a4dd50a..215141d 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -104,6 +104,7 @@ main (int argc, char **argv)
 	GError *error = NULL;
 	RBShell *rb_shell;
 	gboolean activated;
+	gboolean autostarted;
 	char *accel_map_file = NULL;
 	char *desktop_file_path;
 
@@ -125,6 +126,8 @@ main (int argc, char **argv)
 
 	rb_profile_start ("starting rhythmbox");
 
+	autostarted = (g_getenv ("DESKTOP_AUTOSTART_ID") != NULL);
+
 #ifdef USE_UNINSTALLED_DIRS
 	desktop_file_path = g_build_filename (SHARE_UNINSTALLED_BUILDDIR, "rhythmbox.desktop", NULL);
 #else
@@ -270,7 +273,7 @@ main (int argc, char **argv)
 
 		g_setenv ("PULSE_PROP_media.role", "music", TRUE);
 
-		rb_shell = rb_shell_new (no_registration, no_update, dry_run, rhythmdb_file, playlists_file);
+		rb_shell = rb_shell_new (no_registration, no_update, dry_run, autostarted, rhythmdb_file, playlists_file);
 		g_object_weak_ref (G_OBJECT (rb_shell), main_shell_weak_ref_cb, NULL);
 		if (!no_registration && session_bus != NULL) {
 			GObject *obj;
diff --git a/shell/rb-shell.c b/shell/rb-shell.c
index f58358c..bc0f4a4 100644
--- a/shell/rb-shell.c
+++ b/shell/rb-shell.c
@@ -260,6 +260,7 @@ enum
 	PROP_SOURCE_HEADER,
 	PROP_VISIBILITY,
 	PROP_TRACK_TRANSFER_QUEUE,
+	PROP_AUTOSTARTED
 };
 
 /* prefs */
@@ -325,6 +326,7 @@ struct _RBShellPrivate
 	gboolean no_registration;
 	gboolean no_update;
 	gboolean dry_run;
+	gboolean autostarted;
 	char *rhythmdb_file;
 	char *playlists_file;
 
@@ -720,6 +722,18 @@ rb_shell_class_init (RBShellClass *klass)
 							      "RBTrackTransferQueue object",
 							      RB_TYPE_TRACK_TRANSFER_QUEUE,
 							      G_PARAM_READABLE));
+	/**
+	 * RBShell:autostarted:
+	 *
+	 * Whether Rhythmbox was automatically started by the session manager
+	 */
+	g_object_class_install_property (object_class,
+					 PROP_AUTOSTARTED,
+					 g_param_spec_boolean ("autostarted",
+							       "autostarted",
+							       "TRUE if autostarted",
+							       FALSE,
+							       G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 
 	/**
 	 * RBShell::visibility-changed:
@@ -887,6 +901,9 @@ rb_shell_set_property (GObject *object,
 	case PROP_VISIBILITY:
 		rb_shell_set_visibility (shell, FALSE, g_value_get_boolean (value));
 		break;
+	case PROP_AUTOSTARTED:
+		shell->priv->autostarted = g_value_get_boolean (value);
+		break;
 	default:
 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 		break;
@@ -972,6 +989,9 @@ rb_shell_get_property (GObject *object,
 	case PROP_TRACK_TRANSFER_QUEUE:
 		g_value_set_object (value, shell->priv->track_transfer_queue);
 		break;
+	case PROP_AUTOSTARTED:
+		g_value_set_boolean (value, shell->priv->autostarted);
+		break;
 	default:
 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
 		break;
@@ -1112,6 +1132,7 @@ rb_shell_finalize (GObject *object)
  * @no_registration: if %TRUE, single-instance features are disabled
  * @no_update: if %TRUE, don't update the database file
  * @dry_run: if %TRUE, don't write back file metadata changes
+ * @autostarted: %TRUE if autostarted by the session manager
  * @rhythmdb: path to the database file
  * @playlists: path to the playlist file
  *
@@ -1124,6 +1145,7 @@ RBShell *
 rb_shell_new (gboolean no_registration,
 	      gboolean no_update,
 	      gboolean dry_run,
+	      gboolean autostarted,
 	      char *rhythmdb,
 	      char *playlists)
 {
@@ -1131,7 +1153,9 @@ rb_shell_new (gboolean no_registration,
 			  "no-registration", no_registration,
 			  "no-update", no_update,
 			  "dry-run", dry_run, "rhythmdb-file", rhythmdb, 
-			  "playlists-file", playlists, NULL);
+			  "playlists-file", playlists,
+			  "autostarted", autostarted,
+			  NULL);
 }
 
 static GMountOperation *
diff --git a/shell/rb-shell.h b/shell/rb-shell.h
index 945c9f4..60caa03 100644
--- a/shell/rb-shell.h
+++ b/shell/rb-shell.h
@@ -94,6 +94,7 @@ GType		rb_shell_get_type	(void);
 RBShell *	rb_shell_new		(gboolean no_registration,
 					 gboolean no_update,
 					 gboolean dry_run,
+					 gboolean autostarted,
 					 char *rhythmdb,
 					 char *playlists);
 
