guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: services: xorg: Include ~/.guix-profile/bin to the session's $PAT


From: Ludovic Courtès
Subject: 02/03: services: xorg: Include ~/.guix-profile/bin to the session's $PATH.
Date: Thu, 20 Nov 2014 20:14:53 +0000

civodul pushed a commit to branch master
in repository guix.

commit 1d18d87f34d8476ab8cf26b13b3a3ec12223cdb6
Author: Ludovic Courtès <address@hidden>
Date:   Thu Nov 20 21:12:04 2014 +0100

    services: xorg: Include ~/.guix-profile/bin to the session's $PATH.
    
    Fixes <http://bugs.gnu.org/19119>.
    Reported by David Thompson <address@hidden>.
    
    * gnu/services/xorg.scm (xinitrc): Augment $PATH to include
      ~/.guix-profile/bin.
---
 gnu/services/xorg.scm |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 2d25635..5236573 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -142,10 +142,18 @@ EndSection
     #~(begin
         (use-modules (ice-9 match))
 
-        ;; First, try to run ~/.xsession.
-        (let* ((home (getenv "HOME"))
-               (file (string-append home "/.xsession")))
-          (false-if-exception (execl file file)))
+        (let* ((home     (getenv "HOME"))
+               (profile  (string-append home "/.guix-profile/bin"))
+               (PATH     (or (getenv "PATH") ""))
+               (xsession (string-append home "/.xsession")))
+          ;; Make sure the user's profile is visible.
+          (setenv "PATH"
+                  (string-append profile
+                                 (if (string-null? PATH) "" ":")
+                                 PATH))
+
+          ;; First, try to run ~/.xsession.
+          (false-if-exception (execl xsession xsession)))
 
         ;; Then try a pre-configured session type.
         (let ((ratpoison (string-append #$ratpoison "/bin/ratpoison"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]