This patch ensures '.desktop' files are picked up in the system profile and not in the directories listed in $XDG_DATA_DIRS. The latter includes 'gnome-session.desktop', which should be used if it's in /run/current-system/profile, and only then. Fixes . diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c index 4b709731..3b83fcd3 100644 --- a/daemon/gdm-session.c +++ b/daemon/gdm-session.c @@ -362,16 +362,15 @@ get_system_session_dirs (GdmSession *self, GArray *search_array = NULL; char **search_dirs; int i, j; - const gchar * const *system_data_dirs = g_get_system_data_dirs (); static const char *x_search_dirs[] = { "/etc/X11/sessions/", DMCONFDIR "/Sessions/", DATADIR "/gdm/BuiltInSessions/", - DATADIR "/xsessions/", + "/run/current-system/profile/share/xsessions/", }; - static const char *wayland_search_dir = DATADIR "/wayland-sessions/"; + static const char *wayland_search_dir = "/run/current-system/profile/share/wayland-sessions/"; search_array = g_array_new (TRUE, TRUE, sizeof (char *)); @@ -380,11 +379,6 @@ get_system_session_dirs (GdmSession *self, if (g_str_equal (supported_type, "x11") && (type == NULL || g_str_equal (type, supported_type))) { - for (i = 0; system_data_dirs[i]; i++) { - gchar *dir = g_build_filename (system_data_dirs[i], "xsessions", NULL); - g_array_append_val (search_array, dir); - } - g_array_append_vals (search_array, x_search_dirs, G_N_ELEMENTS (x_search_dirs)); } @@ -392,11 +386,6 @@ get_system_session_dirs (GdmSession *self, #ifdef ENABLE_WAYLAND_SUPPORT if (g_str_equal (supported_type, "wayland") && (type == NULL || g_str_equal (type, supported_type))) { - for (i = 0; system_data_dirs[i]; i++) { - gchar *dir = g_build_filename (system_data_dirs[i], "wayland-sessions", NULL); - g_array_append_val (search_array, dir); - } - g_array_append_val (search_array, wayland_search_dir); } #endif diff --git a/libgdm/gdm-sessions.c b/libgdm/gdm-sessions.c index d8b4d5cd..7ed8de91 100644 --- a/libgdm/gdm-sessions.c +++ b/libgdm/gdm-sessions.c @@ -275,7 +275,7 @@ collect_sessions (void) "/etc/X11/sessions/", DMCONFDIR "/Sessions/", DATADIR "/gdm/BuiltInSessions/", - DATADIR "/xsessions/", + "/run/current-system/profile/share/xsessions/" }; const gchar *supported_session_types_env = NULL; g_auto (GStrv) supported_session_types = NULL; @@ -288,29 +288,17 @@ collect_sessions (void) names_seen_before = g_hash_table_new (g_str_hash, g_str_equal); xorg_search_array = g_ptr_array_new_with_free_func (g_free); - const gchar * const *system_data_dirs = g_get_system_data_dirs (); - - for (i = 0; system_data_dirs[i]; i++) { - session_dir = g_build_filename (system_data_dirs[i], "xsessions", NULL); - g_ptr_array_add (xorg_search_array, session_dir); - } - for (i = 0; i < G_N_ELEMENTS (xorg_search_dirs); i++) { g_ptr_array_add (xorg_search_array, g_strdup (xorg_search_dirs[i])); } #ifdef ENABLE_WAYLAND_SUPPORT const char *wayland_search_dirs[] = { - DATADIR "/wayland-sessions/", + "/run/current-system/profile/share/wayland-sessions/", }; wayland_search_array = g_ptr_array_new_with_free_func (g_free); - for (i = 0; system_data_dirs[i]; i++) { - session_dir = g_build_filename (system_data_dirs[i], "wayland-sessions", NULL); - g_ptr_array_add (wayland_search_array, session_dir); - } - for (i = 0; i < G_N_ELEMENTS (wayland_search_dirs); i++) { g_ptr_array_add (wayland_search_array, g_strdup (wayland_search_dirs[i])); } e>)[target]: New field, (image-target): new public method. * gnu/system/image.scm (hurd-disk-image): Set "i586-pc-gnu" as image 'target' field, (maybe-with-target): new procedure, (system-image): honor image 'target' field using the above procedure. Mathieu Othacehe 2020-05-26image: Add partition file-system options support....* gnu/image.scm (<partition>)[file-system-options]: New field, (partition-file-system-options): new exported procedure. * gnu/system/image.scm (partition->gexp): Adapt accordingly. * gnu/build/image.scm (sexp->partition): Also adapt accordingly, (make-ext-image): and pass file-system options to mke2fs. Mathieu Othacehe 2020-05-26image: Set offset default to zero....* gnu/image.scm (<partition>)[offset]: Set to zero by default. * gnu/system/image.scm (system-disk-image): Adapt accordingly. Mathieu Othacehe 2020-05-26image: Add partition offset support....* gnu/image.scm (partition-offset): New procedure, (<partition>)[offset]: new field. * gnu/system/image.scm (system-disk-image): Apply the partition offset. Mathieu Othacehe 2020-05-05image: Add a new API....Raw disk-images and ISO9660 images are created in a Qemu virtual machine. This is quite fragile, very slow, and almost unusable without KVM. For all these reasons, add support for host image generation. This implies the use new image generation mechanisms. - Raw disk images: images of partitions are created using tools such as mke2fs and mkdosfs depending on the partition file-system type. The partition images are then assembled into a final image using genimage. - ISO9660 images: the ISO root directory is populated within the store. GNU xorriso is then called on that directory, in the exact same way as this is done in (gnu build vm) module. Those mechanisms are built upon the new (gnu image) module. * gnu/image.scm: New file. * gnu/system/image.scm: New file. * gnu/build/image: New file. * gnu/local.mk: Add them. * gnu/system/vm.scm (system-disk-image): Rename to system-disk-image-in-vm. * gnu/ci.scm (qemu-jobs): Adapt to new API. * gnu/tests/install.scm (run-install): Ditto. * guix/scripts/system.scm (system-derivation-for-action): Ditto. Mathieu Othacehe