all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Feng Shu <tumashu@163.com>
To: 67738@debbugs.gnu.org
Subject: bug#67738: [PATCH] services: xorg: Find sessions from guix home directory.
Date: Thu, 14 Dec 2023 10:58:02 +0800	[thread overview]
Message-ID: <87msud7a8c.fsf@163.com> (raw)
In-Reply-To: <87bkaysgv1.fsf@163.com>



From 19ca112441184a2c54a02ebbb6b84bca1c23dfea Mon Sep 17 00:00:00 2001

* 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


-- 





  reply	other threads:[~2023-12-14  3:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-10  6:37 bug#67738: xinitrc function in services/xorg.scm do not handle guix-home's direcory Feng Shu
2023-12-14  2:58 ` Feng Shu [this message]
2023-12-15  0:46 ` bug#67738: [PATCH v2] services: xorg: Find sessions from guix home directory Feng Shu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87msud7a8c.fsf@163.com \
    --to=tumashu@163.com \
    --cc=67738@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.