From patchwork Fri Dec 15 00:35:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Feng Shu X-Patchwork-Id: 57608 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 66F1727BBE9; Fri, 15 Dec 2023 00:36:28 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C50AF27BBE2 for ; Fri, 15 Dec 2023 00:36:23 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rDwBV-0005Pv-Cd; Thu, 14 Dec 2023 19:36:09 -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 ) id 1rDwBS-0005PR-5z for guix-patches@gnu.org; Thu, 14 Dec 2023 19:36:06 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rDwBO-0000sF-7n for guix-patches@gnu.org; Thu, 14 Dec 2023 19:36:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rDwBN-0004M9-NX for guix-patches@gnu.org; Thu, 14 Dec 2023 19:36:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67819] [PATCH v2] services: xorg: dbus-daemon-wrapper handle guix home References: <87il517a4n.fsf@163.com> In-Reply-To: <87il517a4n.fsf@163.com> Resent-From: Feng Shu Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 15 Dec 2023 00:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67819 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67819@debbugs.gnu.org Received: via spool by 67819-submit@debbugs.gnu.org id=B67819.170260054916719 (code B ref 67819); Fri, 15 Dec 2023 00:36:01 +0000 Received: (at 67819) by debbugs.gnu.org; 15 Dec 2023 00:35:49 +0000 Received: from localhost ([127.0.0.1]:51229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDwBA-0004Lb-Rz for submit@debbugs.gnu.org; Thu, 14 Dec 2023 19:35:49 -0500 Received: from m15.mail.163.com ([45.254.50.219]:35400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDwB7-0004LP-5N for 67819@debbugs.gnu.org; Thu, 14 Dec 2023 19:35:47 -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=3L2F6CL5a6623/yhZjpI7+uhq6n4wLaOzlcZXGXa1aM=; b=A2an31OEYfYRymNhoBClDQh3GPnehtPonM4xF85ce1ZSm4a/UhWTtWD3n1rOoe FpmtN70fz26eKAxhNL2pOfRaSshcOp3mPrdGUAKVS4Vj03/JHKCeUmqDfzMjM2Yx ZY74RJBSTDI+qge5U+k0EBue/I8a3eKzs5EDSGHQbnz+8= Received: from Tumashu (unknown [218.92.14.78]) by zwqz-smtp-mta-g2-0 (Coremail) with SMTP id _____wBnTTFan3tlXyjeFg--.41169S2; Fri, 15 Dec 2023 08:35:38 +0800 (CST) From: Feng Shu Date: Fri, 15 Dec 2023 08:35:38 +0800 Message-ID: <87r0jos3ol.fsf@163.com> MIME-Version: 1.0 Content-Disposition: inline; filename=v2-0001-services-xorg-dbus-daemon-wrapper-handle-guix-hom.patch Content-Description: [PATCH v2] services: xorg: dbus-daemon-wrapper handle guix home X-CM-TRANSID: _____wBnTTFan3tlXyjeFg--.41169S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxU4_HUUUUUU X-Originating-IP: [218.92.14.78] X-CM-SenderInfo: 5wxpt2lkx6il2tof0z/1tbiwB5H1FXlxjtTUAAAsD X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From e4a5ee8fd8a71782fdc15a8177cd1474e3135d99 Mon Sep 17 00:00:00 2001 From: Feng Shu Date: Thu, 14 Dec 2023 11:02:51 +0800 Subject: [PATCH v2] services: xorg: dbus-daemon-wrapper handle guix home directory. * gnu/services/xorg.scm (dbus-daemon-wrapper): Handle guix home directory. --- gnu/services/xorg.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 9235295dd6..56d3c737d9 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -987,6 +987,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")))) + ;; If we are able to find the user's profile, we can add it to ;; the search paths set below. We need to do this so that D-Bus ;; can start services installed by the user. This allows @@ -995,7 +1000,9 @@ (define user-profile ;; in the user's profile. See . (define profiles (if user-profile - (list user-profile system-profile) + (if guix-home-profile + (list user-profile guix-home-profile system-profile) + (list user-profile system-profile)) (list system-profile))) (setenv "XDG_CONFIG_DIRS" -- 2.39.2