summary refs log tree commit diff
path: root/pkgs/desktops/gnome-3/core/gdm/sessions_dir.patch
blob: bbc803d49c19f18a8359b9a0d4dbeed5dd023c2e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index ff3a1acb..b8705d8f 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -344,6 +344,7 @@ get_system_session_dirs (GdmSession *self)
         char **search_dirs;
 
         static const char *x_search_dirs[] = {
+                "/var/empty",
                 "/etc/X11/sessions/",
                 DMCONFDIR "/Sessions/",
                 DATADIR "/gdm/BuiltInSessions/",
@@ -351,6 +352,10 @@ get_system_session_dirs (GdmSession *self)
                 NULL
         };
 
+        if (getenv("GDM_SESSIONS_DIR") != NULL) {
+                x_search_dirs[0] = getenv("GDM_SESSIONS_DIR");
+        };
+
         static const char *wayland_search_dir = DATADIR "/wayland-sessions/";
 
         search_array = g_array_new (TRUE, TRUE, sizeof (char *));