diff mbox series

[bug#67831,v2] services: xorg: Find sessions from guix home directory.

Message ID 87o7ess3n1.fsf@163.com
State New
Headers show
Series [bug#67831,v2] services: xorg: Find sessions from guix home directory. | expand

Commit Message

Feng Shu Dec. 15, 2023, 12:36 a.m. UTC

Comments

Feng Shu Dec. 15, 2023, 12:52 a.m. UTC | #1
Sorry, it repeat with: https://issues.guix.gnu.org/67738

--
diff mbox series

Patch

From 0e3968aff482ed8ef912f02b744631bb8899f9e4 Mon Sep 17 00:00:00 2001
From: Feng Shu <tumashu@163.com>
Date: Thu, 14 Dec 2023 10:58:02 +0800
Subject: [PATCH v2] services: xorg: Find sessions from guix home directory.

* gnu/services/xorg.scm (xinitrc): Find sessions from guix home directory.
---
 gnu/services/xorg.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index f8cf9f25b6..9235295dd6 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -458,6 +458,11 @@  (define user-profile
                  (lambda (pw)
                    (string-append (passwd:dir pw) "/.guix-profile"))))
 
+        (define guix-home-profile
+          (and=> (getpw (getuid))
+                 (lambda (pw)
+                   (string-append (passwd:dir pw) "/.guix-home/profile"))))
+
         (define (xsession-command desktop-file)
           ;; Read from DESKTOP-FILE its X session command and return it as a
           ;; list.
@@ -503,6 +508,7 @@  (define (find-session profile)
               (apply exec-from-login-shell
                      (or session
                          (find-session user-profile)
+                         (find-session guix-home-profile)
                          (find-session system-profile)))))))
 
   (program-file "xinitrc" builder))
-- 
2.39.2