GNU bug report logs - #67738
xinitrc function in services/xorg.scm do not handle guix-home's direcory.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Feng Shu <tumashu@HIDDEN>; dated Sun, 10 Dec 2023 06:39:02 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at 67738 <at> debbugs.gnu.org:


Received: (at 67738) by debbugs.gnu.org; 15 Dec 2023 00:46:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 14 19:46:09 2023
Received: from localhost ([127.0.0.1]:51246 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rDwLB-0007CJ-9C
	for submit <at> debbugs.gnu.org; Thu, 14 Dec 2023 19:46:09 -0500
Received: from m15.mail.163.com ([45.254.50.220]:33828)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tumashu@HIDDEN>) id 1rDwL8-00077A-2b
 for 67738 <at> debbugs.gnu.org; Thu, 14 Dec 2023 19:46:08 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com;
 s=s110527; h=From:Subject:Date:Message-ID:MIME-Version:
 Content-Type; bh=9JDFV2lIPkyLU3r/bOscisbBcYXqD0lK3dOFButMJz4=;
 b=DgyhFLdQt5IsCWKRGrz5RaX96U6btDIwnE36fi+Cy3Hc8uon/tOJtQmmG0Oacy
 O8GdqOyfRpaBnCIH8bzreYE9HTotoCjVfSh9dIPRfHKgzfPrTvMPKP/EdwTZ44TW
 8FozNBJ6axa6ciMlcEzWotCYpR1rHrEGeQIVO0A+kNiQU=
Received: from Tumashu (unknown [218.92.14.78])
 by zwqz-smtp-mta-g1-3 (Coremail) with SMTP id _____wD33xXIoXtlzhZ9Cg--.47939S2;
 Fri, 15 Dec 2023 08:46:01 +0800 (CST)
From: Feng Shu <tumashu@HIDDEN>
To: 67738 <at> debbugs.gnu.org
Subject: [PATCH v2] services: xorg: Find sessions from guix home directory.
Date: Fri, 15 Dec 2023 08:46:00 +0800
Message-ID: <87bkass37b.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-CM-TRANSID: _____wD33xXIoXtlzhZ9Cg--.47939S2
X-Coremail-Antispam: 1Uf129KBjvdXoW7XF47tF4rKrW8Zr4fJFWfuFg_yoWkuFc_A3
 yxXF48J39xJa4xJw4Yvr1rZF9Yv3y7JrWfCw4agr47tw1xWa1kZF1qgrWjvwn5Gay8Ka4Y
 q39Iq3yfKr1qgjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT
 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU1K0PPUUUUU==
X-Originating-IP: [218.92.14.78]
X-CM-SenderInfo: 5wxpt2lkx6il2tof0z/xtbBFwtH1Fgi7iURSQAAsm
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 67738
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From 0e3968aff482ed8ef912f02b744631bb8899f9e4 Mon Sep 17 00:00:00 2001
From: Feng Shu <tumashu@HIDDEN>
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


-- 





Information forwarded to bug-guix@HIDDEN:
bug#67738; Package guix. Full text available.

Message received at 67738 <at> debbugs.gnu.org:


Received: (at 67738) by debbugs.gnu.org; 14 Dec 2023 03:08:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 13 22:08:01 2023
Received: from localhost ([127.0.0.1]:59970 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rDc4u-0003VQ-Fl
	for submit <at> debbugs.gnu.org; Wed, 13 Dec 2023 22:08:01 -0500
Received: from m15.mail.163.com ([45.254.50.220]:47392)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tumashu@HIDDEN>) id 1rDc4n-0003V6-4o
 for 67738 <at> debbugs.gnu.org; Wed, 13 Dec 2023 22:07:58 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com;
 s=s110527; h=From:Subject:MIME-Version:Content-Type:Date:
 Message-ID; bh=+Ozy4IBiMY7Tcve7x9COA1AbMWHXoW7eiNmOk3MZ1/M=; b=K
 Uzh6Ca+XBql6K22zfQvuFJrygsRonvYUZh1EOD2MMWQLOenogKjC1kUiTqdZ0jGT
 507cQ27RGEFIS3AyI/z5fvg9wZka4kHnZBLBnPT7heR2HAhwJGF0OZSQ0zzq3rmQ
 3XqJgl3+DOqehabapkhCSrlxVmtuunPXeYxMkg1mMM=
Received: from Tumashu (unknown [218.92.14.78])
 by zwqz-smtp-mta-g2-0 (Coremail) with SMTP id _____wAX_zJzcXpl4w2JFg--.31469S2;
 Thu, 14 Dec 2023 11:07:31 +0800 (CST)
From: Feng Shu <tumashu@HIDDEN>
To: 67738 <at> debbugs.gnu.org
Subject: [PATCH] services: xorg: Find sessions from guix home directory.
MIME-Version: 1.0
Content-Type: text/plain
Date: Thu, 14 Dec 2023 10:58:02 +0800
Message-ID: <87msud7a8c.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
X-CM-TRANSID: _____wAX_zJzcXpl4w2JFg--.31469S2
X-Coremail-Antispam: 1Uf129KBjvdXoWrtw4UKryfAF4DKF1xZryUAwb_yoWDCrb_A3
 yxXF48J3y3Ja4xJrWYvr1rZF90v3y7JrWfGa1agr47tw1xWa1kZFnFgrWjvw15GayUta4Y
 q3yaq3yfKFn7WjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT
 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU8jsjUUUUUU==
X-Originating-IP: [218.92.14.78]
X-CM-SenderInfo: 5wxpt2lkx6il2tof0z/1tbiwBRG1FXlxirm5gAAsa
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 67738
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



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


-- 





Information forwarded to bug-guix@HIDDEN:
bug#67738; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 Dec 2023 06:38:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 10 01:38:05 2023
Received: from localhost ([127.0.0.1]:49375 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rCDS1-00081F-4u
	for submit <at> debbugs.gnu.org; Sun, 10 Dec 2023 01:38:05 -0500
Received: from lists.gnu.org ([2001:470:142::17]:57180)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tumashu@HIDDEN>) id 1rCDRv-00080i-GW
 for submit <at> debbugs.gnu.org; Sun, 10 Dec 2023 01:38:03 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <tumashu@HIDDEN>) id 1rCDRc-0000hZ-1N
 for bug-guix@HIDDEN; Sun, 10 Dec 2023 01:37:40 -0500
Received: from m12.mail.163.com ([220.181.12.197])
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <tumashu@HIDDEN>) id 1rCDRX-0007qU-PN
 for bug-guix@HIDDEN; Sun, 10 Dec 2023 01:37:39 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com;
 s=s110527; h=From:Subject:Date:Message-ID:MIME-Version:
 Content-Type; bh=nBWyjAJ+NZ32rOVBgwuAw6dpPL9IhxxKXZLMGnu3IDA=;
 b=haHtsrr2hCZ97dRVdVMMZGlFRvWe4gci/4tJwPUF41CF6mFmVKcNcIfhnvDHy0
 QibqVB49nVrKH2XWOTmMKbJMPYxPMt/vlREP4UNcDRmHB2D9nChwb/qE79KMebNL
 S70YSlDcCv4fcglCkBEXTrNCxGKQRiy+HI6gKNHoK0TXg=
Received: from Guix (unknown [117.92.146.182])
 by zwqz-smtp-mta-g4-0 (Coremail) with SMTP id _____wD3f22jXHVlLCbvFA--.2519S2; 
 Sun, 10 Dec 2023 14:37:23 +0800 (CST)
From: Feng Shu <tumashu@HIDDEN>
To: "guix-bug" <bug-guix@HIDDEN>
Subject: xinitrc function in services/xorg.scm do not handle guix-home's
 direcory. 
Date: Sun, 10 Dec 2023 14:37:22 +0800
Message-ID: <87bkaysgv1.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-CM-TRANSID: _____wD3f22jXHVlLCbvFA--.2519S2
X-Coremail-Antispam: 1Uf129KBjvJXoW7Cry5GF4xCFyUXr48Jw1kKrg_yoW8JFy3pF
 y5uryDGr1DAFyDGw1kJFyjgrW7tFWrtrW8XrWkurykAws8Cr18KFy7C3yfJa4DWa1kCwsx
 ua12v3s5Wr4Dt3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2
 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jbjjgUUUUU=
X-Originating-IP: [117.92.146.182]
X-CM-SenderInfo: 5wxpt2lkx6il2tof0z/xtbBFwVC1Fgi7cQd4AAAsq
Received-SPF: pass client-ip=220.181.12.197; envelope-from=tumashu@HIDDEN;
 helo=m12.mail.163.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_BL=0.001, RCVD_IN_MSPIKE_L4=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)




(define* (xinitrc #:key fallback-session)
  "Return a system-wide xinitrc script that starts the specified X session,
which should be passed to this script as the first argument.  If not, the
@var{fallback-session} will be used or, if @var{fallback-session} is false, a
desktop session from the system or user profile will be used."
  (define builder
    #~(begin
        (use-modules (ice-9 match)
                     (ice-9 regex)
                     (ice-9 ftw)
                     (ice-9 rdelim)
                     (srfi srfi-1)
                     (srfi srfi-26))
        ...

        (define system-profile
          "/run/current-system/profile")

        (define user-profile
          (and=> (getpw (getuid))
                 (lambda (pw)
                   (string-append (passwd:dir pw) "/.guix-profile"))))

        I think we should handle '.guix-home' direcory, just like .guix-profile.

        ...

        (let* ((home          (getenv "HOME"))
               (xsession-file (string-append home "/.xsession"))
               (session       (match (command-line)
                                ((_)
                                 #$(if fallback-session
                                       #~(list #$fallback-session)
                                       #f))
                                ((_ x ..1)
                                 x))))
          (if (file-exists? xsession-file)
              ;; Run ~/.xsession when it exists.
              (apply exec-from-login-shell xsession-file
                     (or session '()))
              ;; Otherwise, start the specified session or a fallback.
              (apply exec-from-login-shell
                     (or session
                         (find-session user-profile)
                         (find-session system-profile)))))))

  (program-file "xinitrc" builder))


-- 





Acknowledgement sent to Feng Shu <tumashu@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#67738; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 20 Jan 2024 12:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.