From 8caa458953eeac783c73a0e5aaa72842fe3914c9 Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Fri, 26 Apr 2019 13:45:36 -0400 Subject: gnu: gdm: Install a placeholder desktop entry. This fixes . * gnu/packages/gnome.scm (gdm)[arguments]: Add a phase that installs a placeholder desktop entry file. Co-authored-by: Danny Milosavljevic --- gnu/packages/gnome.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 101c0ce13f..34a9af21f9 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -33,6 +33,7 @@ ;;; Copyright © 2018 Vasile Dumitrascu ;;; Copyright © 2018 Björn Höfling ;;; Copyright © 2018, 2019 Timothy Sample +;;; Copyright © 2019 Danny Milosavljevic ;;; ;;; This file is part of GNU Guix. ;;; @@ -5536,6 +5537,29 @@ libxml2.") (string-append "\"" (assoc-ref inputs "gnome-session") "/bin/gnome-session\""))) #t)) + ;; GDM requires that there be at least one desktop entry + ;; file. This phase installs a hidden one that simply + ;; fails. This enables users to use GDM with a + ;; '~/.xsession' script with no other desktop entry files. + ;; See . + (add-after 'install 'install-placeholder-desktop-entry + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (sessions (string-append out "/share/gdm/BuiltInSessions")) + (fail (string-append sessions "/fail.desktop"))) + (mkdir-p sessions) + (with-output-to-file fail + (lambda () + (for-each + display + '("[Desktop Entry]\n" + "Encoding=UTF-8\n" + "Type=Application\n" + "Name=Fail\n" + "Comment=This session fails immediately.\n" + "NoDisplay=true\n" + "Exec=false\n")))) + #t))) ;; GDM needs GNOME Session to run these applications. We link ;; their autostart files in `share/gdm/greeter/autostart' ;; because GDM explicitly tells GNOME Session to look there. -- cgit 1.4.1