summary refs log tree commit diff
path: root/gnu/packages/mate.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-04-03 17:26:58 +0200
committerLudovic Courtès <ludo@gnu.org>2019-04-03 18:21:42 +0200
commitbfac63667552898b32821c0f0fae1256f5bcab0c (patch)
treee53d3023f32e1158a1cab51b6ab0fbbc764d5d59 /gnu/packages/mate.scm
parent307586c1e3b3fce8a9acc6f494f4972e6d4c3a79 (diff)
downloadguix-bfac63667552898b32821c0f0fae1256f5bcab0c.tar.gz
gnu: mate-session-manager: Provide absolute file name in '.desktop' file.
Previously GDM would crash when selecting MATE.

* gnu/packages/mate.scm (mate-session-manager)[arguments]: Add
'update-xsession-dot-desktop' phase.
Diffstat (limited to 'gnu/packages/mate.scm')
-rw-r--r--gnu/packages/mate.scm16
1 files changed, 15 insertions, 1 deletions
diff --git a/gnu/packages/mate.scm b/gnu/packages/mate.scm
index 00ec24e55e..cf8392a78b 100644
--- a/gnu/packages/mate.scm
+++ b/gnu/packages/mate.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017 ng0 <ng0@n0.is>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -337,7 +338,20 @@ configurations (profiles).")
                (("#ifdef HAVE_SYSTEMD") "#if 0"))
              (substitute* "mate-session/gsm-autostart-app.c"
                (("#ifdef HAVE_SYSTEMD") "#if 0"))
-             #t)))))
+             #t))
+         (add-after 'install 'update-xsession-dot-desktop
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Record the absolute file name of 'mate-session' in the
+             ;; '.desktop' file.
+             (let* ((out (assoc-ref outputs "out"))
+                    (xsession (string-append
+                               out "/share/xsessions/mate.desktop")))
+               (substitute* xsession
+                 (("^Exec=.*$")
+                  (string-append "Exec=" out "/bin/mate-session\n"))
+                 (("^TryExec=.*$")
+                  (string-append "Exec=" out "/bin/mate-session\n")))
+               #t))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("intltool" ,intltool)