diff mbox series

[bug#35377] gnu: gdm: Provide custom session.

Message ID 20190422141501.6140-1-dannym@scratchpost.org
State Accepted
Headers show
Series [bug#35377] gnu: gdm: Provide custom session. | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied

Commit Message

Danny Milosavljevic April 22, 2019, 2:15 p.m. UTC
* gnu/packages/gnome.scm (gdm)[arguments]<#:phases>[install-custom-session]:
Provide custom session.
---
 gnu/packages/gnome.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 101c0ce13f..e3738fbd93 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5536,6 +5536,23 @@  libxml2.")
                (string-append "\"" (assoc-ref inputs "gnome-session")
                               "/bin/gnome-session\"")))
             #t))
+         (add-after 'install 'install-custom-session
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (builtin-sessions (string-append out
+                                                     "/share/gdm/BuiltInSessions")))
+               (mkdir-p builtin-sessions)
+               (call-with-output-file (string-append builtin-sessions "/custom.desktop")
+                 (lambda (port)
+                   (format port "[Desktop Entry]
+Encoding=UTF-8
+Type=Application
+Name=Custom Session
+Comment=Customized user session (in ~/.xsession)
+X-GDM-BypassXsession=false
+Exec=custom
+")))
+               #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.