Gentoo bug 266398 GNOME #580793 and #571417 Index: nautilus-2.26.2/src/nautilus-main.c =================================================================== --- nautilus-2.26.2.orig/src/nautilus-main.c 2009-04-29 17:02:32.709364982 +0200 +++ nautilus-2.26.2/src/nautilus-main.c 2009-04-29 17:39:36.529860872 +0200 @@ -391,9 +391,6 @@ main (int argc, char *argv[]) g_set_prgname ("nautilus"); - if (g_file_test (DATADIR "/applications/nautilus.desktop", G_FILE_TEST_EXISTS)) { - egg_set_desktop_file (DATADIR "/applications/nautilus.desktop"); - } context = g_option_context_new (_("\n\nBrowse the file system with the file manager")); g_option_context_add_main_entries (context, options, NULL); @@ -464,6 +461,15 @@ main (int argc, char *argv[]) (NAUTILUS_PREFERENCES_DESKTOP_IS_HOME_DIR, TRUE); } + /* Which .desktop file contains the relevant session management + information? */ + if ((no_desktop || !eel_preferences_get_boolean (NAUTILUS_PREFERENCES_SHOW_DESKTOP)) + && g_file_test (DATADIR "/applications/nautilus-home.desktop", G_FILE_TEST_EXISTS)) { + egg_set_desktop_file (DATADIR "/applications/nautilus-home.desktop"); + } else if (g_file_test (DATADIR "/applications/nautilus.desktop", G_FILE_TEST_EXISTS)) { + egg_set_desktop_file (DATADIR "/applications/nautilus.desktop"); + } + application = NULL; /* Do either the self-check or the real work. */