Danny Milosavljevic wrote 6 years ago
(address . guix-patches@gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
* gnu/packages/gnome.scm (gdm)[arguments]<#:phases>[install-custom-session]:
Provide custom session.
---
gnu/packages/gnome.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
Toggle diff (28 lines)
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.