[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: gnu: gdm: Install a placeholder desktop entry.
From: |
guix-commits |
Subject: |
01/01: gnu: gdm: Install a placeholder desktop entry. |
Date: |
Fri, 26 Apr 2019 14:21:51 -0400 (EDT) |
samplet pushed a commit to branch master
in repository guix.
commit 8caa458953eeac783c73a0e5aaa72842fe3914c9
Author: Timothy Sample <address@hidden>
Date: Fri Apr 26 13:45:36 2019 -0400
gnu: gdm: Install a placeholder desktop entry.
This fixes <https://bugs.gnu.org/35068>.
* gnu/packages/gnome.scm (gdm)[arguments]: Add a phase that installs a
placeholder desktop entry file.
Co-authored-by: Danny Milosavljevic <address@hidden>
---
gnu/packages/gnome.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 101c0ce..34a9af2 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -33,6 +33,7 @@
;;; Copyright © 2018 Vasile Dumitrascu <address@hidden>
;;; Copyright © 2018 Björn Höfling <address@hidden>
;;; Copyright © 2018, 2019 Timothy Sample <address@hidden>
+;;; Copyright © 2019 Danny Milosavljevic <address@hidden>
;;;
;;; 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 <https://bugs.gnu.org/35068>.
+ (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.