summaryrefslogtreecommitdiff
path: root/gnu/packages/gnome.scm
diff options
context:
space:
mode:
authorTimothy Sample <samplet@ngyro.com>2019-04-29 14:49:42 -0400
committerTimothy Sample <samplet@ngyro.com>2019-04-29 23:04:27 -0400
commit5aafccebbed7c9474a021623e6d8823cffde95b5 (patch)
treee1c4b602695dd3cdaabeb4efa0f03343915ca50d /gnu/packages/gnome.scm
parent842a687264e4dd88e4aa7f608582d6adc0313a07 (diff)
downloadpatches-5aafccebbed7c9474a021623e6d8823cffde95b5.tar
patches-5aafccebbed7c9474a021623e6d8823cffde95b5.tar.gz
gnu: gdm: Avoid selecting the placeholder session.
This fixes <https://bugs.gnu.org/35484>. * gnu/packages/gnome.scm (gdm)[arguments]: Modify the pre-configure phase to patch GDM to only select the placeholder session if there are no others.
Diffstat (limited to 'gnu/packages/gnome.scm')
-rw-r--r--gnu/packages/gnome.scm12
1 files changed, 11 insertions, 1 deletions
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 17dc2fd102..f19b1836d3 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5597,7 +5597,7 @@ libxml2.")
(modify-phases %standard-phases
(add-before
'configure 'pre-configure
- (lambda* (#:key inputs #:allow-other-keys)
+ (lambda* (#:key inputs outputs #:allow-other-keys)
;; We don't have <systemd/sd-daemon.h>.
(substitute* '("common/gdm-log.c"
"daemon/gdm-server.c"
@@ -5665,6 +5665,16 @@ libxml2.")
(("\"gnome-session\"")
(string-append "\"" (assoc-ref inputs "gnome-session")
"/bin/gnome-session\"")))
+ ;; Do not automatically select the placeholder session.
+ (substitute* "daemon/gdm-session.c"
+ (("!g_str_has_suffix [(]base_name, \"\\.desktop\"[)]")
+ (string-append "!g_str_has_suffix (base_name, \".desktop\") || "
+ "(g_strcmp0(search_dirs[i], \""
+ (assoc-ref outputs "out") "/share/gdm/BuiltInSessions/"
+ "\") == 0 && "
+ "g_strcmp0(base_name, \"fail.desktop\") == 0)"))
+ (("g_error [(]\"GdmSession: no session desktop files installed, aborting\\.\\.\\.\"[)];")
+ "{ self->priv->fallback_session_name = g_strdup(\"fail\"); goto out; }"))
#t))
;; GDM requires that there be at least one desktop entry
;; file. This phase installs a hidden one that simply