git.iko.soy/typeable/nixpkgs
on master help sign in
gnome3.gdm: fix session chooser

We are patching GDM to respect GDM_SESSIONS_DIR environment variable, which we are setting in the GDM module. Previously, we only took care of a single code path, the one that handled session start-up; missing the one obtaining the list of sessions. This commit patches the second code path, and also whitelists the GDM_SESSIONS_DIR so that it can be passed to the greeter. Fixes #34101

commit300af6677760944a3c27f7bf33a1366c380c3317 authorJan Tojnar <jtojnar@gmail.com> dateWed 2 May 2018, 04:16 (9 years ago) parent127de74
1 file changed+34−5
pkgs/desktops/gnome-3/core/gdm/sessions_dir.patch+34−5
pkgs/desktops/gnome-3/core/gdm/sessions_dir.patch+34−5
@@ -1,8 +1,17 @@
1−diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
2−index ff3a1acb..b8705d8f 100644
1+--- a/daemon/gdm-launch-environment.c
2++++ b/daemon/gdm-launch-environment.c
3+@@ -126,7 +126,7 @@
4+ "LC_COLLATE", "LC_MONETARY", "LC_MESSAGES", "LC_PAPER",
5+ "LC_NAME", "LC_ADDRESS", "LC_TELEPHONE", "LC_MEASUREMENT",
6+ "LC_IDENTIFICATION", "LC_ALL", "WINDOWPATH", "XCURSOR_PATH",
7+- "XDG_CONFIG_DIRS", NULL
8++ "XDG_CONFIG_DIRS", "GDM_SESSIONS_DIR", NULL
9+ };
10+ char *system_data_dirs;
11+ int i;
312--- a/daemon/gdm-session.c
413+++ b/daemon/gdm-session.c
5−@@ -344,6 +344,7 @@ get_system_session_dirs (GdmSession *self)
14+@@ -345,12 +345,17 @@
615 char **search_dirs;
716
817 static const char *x_search_dirs[] = {
@@ -10,8 +19,7 @@ index ff3a1acb..b8705d8f 100644
1019 "/etc/X11/sessions/",
1120 DMCONFDIR "/Sessions/",
1221 DATADIR "/gdm/BuiltInSessions/",
13−@@ -351,6 +352,10 @@ get_system_session_dirs (GdmSession *self)
14− NULL
22+ DATADIR "/xsessions/",
1523 };
1624
1725+ if (getenv("GDM_SESSIONS_DIR") != NULL) {
@@ -21,3 +29,24 @@ index ff3a1acb..b8705d8f 100644
2129 static const char *wayland_search_dir = DATADIR "/wayland-sessions/";
2230
2331 search_array = g_array_new (TRUE, TRUE, sizeof (char *));
32+--- a/libgdm/gdm-sessions.c
33++++ b/libgdm/gdm-sessions.c
34+@@ -217,6 +217,7 @@
35+ {
36+ int i;
37+ const char *xorg_search_dirs[] = {
38++ "/var/empty/",
39+ "/etc/X11/sessions/",
40+ DMCONFDIR "/Sessions/",
41+ DATADIR "/gdm/BuiltInSessions/",
42+@@ -224,6 +225,10 @@
43+ NULL
44+ };
45+
46++ if (g_getenv("GDM_SESSIONS_DIR") != NULL) {
47++ xorg_search_dirs[0] = g_getenv("GDM_SESSIONS_DIR");
48++ };
49++
50+ #ifdef ENABLE_WAYLAND_SUPPORT
51+ const char *wayland_search_dirs[] = {
52+ DATADIR "/wayland-sessions/",