From unknown Tue Aug 19 12:51:06 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#58454 <58454@debbugs.gnu.org> To: bug#58454 <58454@debbugs.gnu.org> Subject: Status: [PATCH 0/1] gnu: home: Add home-dbus-service-type. Reply-To: bug#58454 <58454@debbugs.gnu.org> Date: Tue, 19 Aug 2025 19:51:06 +0000 retitle 58454 [PATCH 0/1] gnu: home: Add home-dbus-service-type. reassign 58454 guix-patches submitter 58454 "(" severity 58454 normal tag 58454 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 11 15:45:33 2022 Received: (at submit) by debbugs.gnu.org; 11 Oct 2022 19:45:33 +0000 Received: from localhost ([127.0.0.1]:54934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiLC0-00009A-Qd for submit@debbugs.gnu.org; Tue, 11 Oct 2022 15:45:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:41726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiLBw-0008Nv-9Y for submit@debbugs.gnu.org; Tue, 11 Oct 2022 15:45:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiLBv-0004rW-4F for guix-patches@gnu.org; Tue, 11 Oct 2022 15:45:28 -0400 Received: from knopi.disroot.org ([178.21.23.139]:53240) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiLBs-00008n-Qy for guix-patches@gnu.org; Tue, 11 Oct 2022 15:45:26 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 825784D6A6; Tue, 11 Oct 2022 21:45:20 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with UTF8SMTP id vdWo5Kxo-7_i; Tue, 11 Oct 2022 21:45:19 +0200 (CEST) From: "(" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1665517517; bh=qJLfGcSKmbF62gwts88Key4Dqth0++EPPiAfrH2iQGM=; h=From:To:Cc:Subject:Date; b=jXR5IjHhVQG3WGmAym+Ec9AZ57D0DZsxmESfGI97mRxYRnZ65+WMI2nZ2aqnNqExj 76Eiqf/mTuYwM/aCkTBwpCFLTTx0xH4tSrLqwJxpWtlSH15aiQ7Fb7t7p+tsQLJ4Pw X/EFl+Vupm0Qbne3wvgmOyC7D9UgjrHCorJFX7voSgerJL/xwIZUpjfJlvXk0wQ2/Z e4nmO2GZR2XFdl3GoqdzkdXKflk7+9Rm3KwTFJMr5t4Nh9D6RjM/YSElcqqXTtN0OG oxBkIkgrHvj6Nlakt9eeqjj4it0ofP4sdC4nUJzBdMEEjGxFRYcFatANdX6/83Mwah KzTGUxZ5ulbFA== To: guix-patches@gnu.org Subject: [PATCH 0/1] gnu: home: Add home-dbus-service-type. Date: Tue, 11 Oct 2022 20:45:13 +0100 Message-Id: <20221011194513.26008-1-paren@disroot.org> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=178.21.23.139; envelope-from=paren@disroot.org; helo=knopi.disroot.org 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: submit Cc: "\(" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This patch adds a home service for running D-Bus in session mode. It's a prerequisite for the ``home-mako-service-type'' I'm writing, as Mako requires a session D-Bus daemon to be running so that it can receive notifications. ( (1): gnu: home: Add home-dbus-service-type. doc/guix.texi | 17 ++++++++++++ gnu/home/services/desktop.scm | 52 ++++++++++++++++++++++++++++++++++- 2 files changed, 68 insertions(+), 1 deletion(-) -- 2.38.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 11 15:54:46 2022 Received: (at 58454) by debbugs.gnu.org; 11 Oct 2022 19:54:46 +0000 Received: from localhost ([127.0.0.1]:54956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiLKw-0000yz-6j for submit@debbugs.gnu.org; Tue, 11 Oct 2022 15:54:46 -0400 Received: from knopi.disroot.org ([178.21.23.139]:36670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiLKs-0000yp-Sc for 58454@debbugs.gnu.org; Tue, 11 Oct 2022 15:54:44 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 7352F4C247; Tue, 11 Oct 2022 21:54:41 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H-FW8mqwSICf; Tue, 11 Oct 2022 21:54:40 +0200 (CEST) From: "(" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1665518080; bh=NvIXPgbKiucY8nUvp3jEx10MLLgGx0Td+Oa8cE/7dHs=; h=From:To:Cc:Subject:Date; b=chM2wald77A5/WJg3YPRCCH/gpKjq3KFaHocCqq6HDKMIOORvplnUOqKy8Ko9V8q7 RJaCjwUNPNoDr506oihDMIKcCpIxm+GdvCBWmq+GCeHt57Xygh75FOHo1Fm+3xpkGA LlY9a2loQRoVvES+j8LKyKapF3P43qucOm3+aaBjMUHeRSFvXou6eaOAd1YyhLi73j Xb9vSKh72Sfysgx5OVEUdeZTY1Yglo+g05jGMyg2VTCf7x7cLCKqPgbTJTvzaH2pgz cEdQfuSqvSvvQC/ZzVU+LhIMHsb/NayOS4wNKtPQe/CNjVH0OShmhBm35tVf69KEQq Hn+JUwdDhNF9w== To: 58454@debbugs.gnu.org Subject: [PATCH 1/1] gnu: home: Add home-dbus-service-type. Date: Tue, 11 Oct 2022 20:54:30 +0100 Message-Id: <20221011195430.26160-1-paren@disroot.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * gnu/home/services/desktop.scm (home-dbus-service-type): New variable. (home-dbus-configuration): New record type. * doc/guix.texi: Document them. --- doc/guix.texi | 17 ++++++++++++ gnu/home/service [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 FROM_ONE_CHAR Bogus FROM name -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Debbugs-Envelope-To: 58454 Cc: "\(" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) * gnu/home/services/desktop.scm (home-dbus-service-type): New variable. (home-dbus-configuration): New record type. * doc/guix.texi: Document them. --- doc/guix.texi | 17 ++++++++++++ gnu/home/services/desktop.scm | 52 ++++++++++++++++++++++++++++++++++- 2 files changed, 68 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 5867acb746..990113703b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41262,6 +41262,23 @@ format. @end deftp +@defvr {Scheme Variable} home-dbus-service-type +This is the service type for running a session-specific D-Bus, for +unprivileged applications that require D-Bus to be running. +@end defvr + +@deftp {Data Type} home-dbus-configuration +The configuration record for @code{home-dbus-service-type}. + +@table @asis +@item @code{dbus} (default: @code{dbus}) +The package providing the @code{/bin/dbus-daemon} command. + +@item @code{verbose?} (default: @code{#f}) +Whether to enable logging. +@end table +@end deftp + @node Guix Home Services @subsection Guix Home Services diff --git a/gnu/home/services/desktop.scm b/gnu/home/services/desktop.scm index b0f4d969b0..4cf151762d 100644 --- a/gnu/home/services/desktop.scm +++ b/gnu/home/services/desktop.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2022 Ludovic Courtès +;;; Copyright © 2022 ( ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,7 @@ (define-module (gnu home services desktop) #:use-module (gnu home services) #:use-module (gnu home services shepherd) #:use-module (gnu services configuration) + #:autoload (gnu packages glib) (dbus) #:autoload (gnu packages xdisorg) (redshift) #:use-module (guix records) #:use-module (guix gexp) @@ -27,8 +29,10 @@ (define-module (gnu home services desktop) #:use-module (ice-9 match) #:export (home-redshift-configuration home-redshift-configuration? + home-redshift-service-type - home-redshift-service-type)) + home-dbus-configuration + home-dbus-service-type)) ;;; @@ -172,3 +176,49 @@ (define home-redshift-service-type (description "Run Redshift, a program that adjusts the color temperature of display according to time of day."))) + + +;;; +;;; D-Bus. +;;; + +(define-record-type* + home-dbus-configuration make-home-dbus-configuration + home-dbus-configuration? + (dbus home-dbus-dbus ;file-like + (default dbus)) + (verbose? home-dbus-verbose? ;boolean + (default #f))) + +(define (home-dbus-shepherd-services config) + (list (shepherd-service + (documentation "Run the D-Bus daemon in session-specific mode.") + (provision '(dbus-session)) + (start #~(make-forkexec-constructor + (list #$(file-append (home-dbus-dbus config) + "/bin/dbus-daemon") + "--nofork" "--session" "--syslog-only" + (format #f "--address=unix:path=~a/bus" + (or (getenv "XDG_RUNTIME_DIR") + (format #f "/run/user/~a" + (getuid))))) + #$@(if (home-dbus-verbose? config) + (list #:environment-variables + #~(list "DBUS_VERBOSE=1") + #:log-file + (format #f "~a/dbus-daemon.log" + (or (getenv "XDG_LOG_HOME") + (format #f "~a/.local/var/log" + (getenv "HOME"))))) + '()))) + (stop #~(make-kill-destructor))))) + +(define home-dbus-service-type + (service-type + (name 'home-dbus) + (extensions + (list (service-extension home-shepherd-service-type + home-dbus-shepherd-services))) + (default-value (home-dbus-configuration)) + (description + "Run the session-specific D-Bus inter-process message bus."))) -- 2.38.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 12 03:25:55 2022 Received: (at submit) by debbugs.gnu.org; 12 Oct 2022 07:25:55 +0000 Received: from localhost ([127.0.0.1]:55520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiW7m-0006Rg-Rn for submit@debbugs.gnu.org; Wed, 12 Oct 2022 03:25:55 -0400 Received: from lists.gnu.org ([209.51.188.17]:37740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiW7k-0006RY-0k for submit@debbugs.gnu.org; Wed, 12 Oct 2022 03:25:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiW7j-00005z-Ol for guix-patches@gnu.org; Wed, 12 Oct 2022 03:25:51 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]:53453) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiW7g-0002Uv-NA for guix-patches@gnu.org; Wed, 12 Oct 2022 03:25:51 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id B5FAEE0012; Wed, 12 Oct 2022 07:25:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1665559543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GC74ZrHRI+l1M50AwtZ70EHzWM62HofFRzhasBv3IVY=; b=PjWCav4k7OvsgXiUKS+/kCc07KG/EvSThPNhXgsn5xdMQdUVyoWj19B/kEOh1m9aHENr7T clsT/TiO42sK5SlWkkycVKVTmur+RuueU7sTf63VwYtHcTeBRwC6+xaVv5vl/IZvQ8CQvc OMK9xg0oDtHkvuPiUFFW9PAr7RfGerTd6AH5fgO8u5LF2aec60mpYHMDgnb+oi8rS1kjnS gnv+lKGZLw5sRdll23zUwv6l2SmmYVN/IPZI55t00KOudfC85/WWzWaI33IMgAr3yASLek HVH3Z/9cfdsoCLC31ehKd9AcYUxzCdeCsUHT1BoiA/AEJJhztTNtvBO9gmknOA== From: Andrew Tropin To: "( via Guix-patches via" , 58454@debbugs.gnu.org Subject: Re: [bug#58454] [PATCH 1/1] gnu: home: Add home-dbus-service-type. In-Reply-To: <20221011195430.26160-1-paren@disroot.org> References: <20221011194513.26008-1-paren@disroot.org> <20221011195430.26160-1-paren@disroot.org> Date: Wed, 12 Oct 2022 11:25:31 +0400 Message-ID: <87ilkpmrkk.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2001:4b98:dc4:8::224; envelope-from=andrew@trop.in; helo=relay4-d.mail.gandi.net X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit Cc: "\(" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi unmatched-paren! Thank you for the patch, it looks good and I think can be merged in the way it is right now, but I wrote a few minor notes/nitpicks below. On 2022-10-11 20:54, "\( via Guix-patches" via wrote: > * gnu/home/services/desktop.scm (home-dbus-service-type): New > variable. > (home-dbus-configuration): New record type. > * doc/guix.texi: Document them. > --- > doc/guix.texi | 17 ++++++++++++ > gnu/home/services/desktop.scm | 52 ++++++++++++++++++++++++++++++++++- > 2 files changed, 68 insertions(+), 1 deletion(-) > > diff --git a/doc/guix.texi b/doc/guix.texi > index 5867acb746..990113703b 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -41262,6 +41262,23 @@ format. >=20=20 > @end deftp >=20=20 > +@defvr {Scheme Variable} home-dbus-service-type > +This is the service type for running a session-specific D-Bus, for > +unprivileged applications that require D-Bus to be running. > +@end defvr > + > +@deftp {Data Type} home-dbus-configuration > +The configuration record for @code{home-dbus-service-type}. > + > +@table @asis > +@item @code{dbus} (default: @code{dbus}) > +The package providing the @code{/bin/dbus-daemon} command. > + > +@item @code{verbose?} (default: @code{#f}) > +Whether to enable logging. > +@end table > +@end deftp > + > @node Guix Home Services > @subsection Guix Home Services >=20=20 > diff --git a/gnu/home/services/desktop.scm b/gnu/home/services/desktop.scm > index b0f4d969b0..4cf151762d 100644 > --- a/gnu/home/services/desktop.scm > +++ b/gnu/home/services/desktop.scm > @@ -1,5 +1,6 @@ > ;;; GNU Guix --- Functional package management for GNU > ;;; Copyright =C2=A9 2022 Ludovic Court=C3=A8s > +;;; Copyright =C2=A9 2022 ( > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -20,6 +21,7 @@ (define-module (gnu home services desktop) > #:use-module (gnu home services) > #:use-module (gnu home services shepherd) > #:use-module (gnu services configuration) > + #:autoload (gnu packages glib) (dbus) > #:autoload (gnu packages xdisorg) (redshift) > #:use-module (guix records) > #:use-module (guix gexp) > @@ -27,8 +29,10 @@ (define-module (gnu home services desktop) > #:use-module (ice-9 match) > #:export (home-redshift-configuration > home-redshift-configuration? > + home-redshift-service-type >=20=20 > - home-redshift-service-type)) > + home-dbus-configuration > + home-dbus-service-type)) >=20=20 > > ;;; > @@ -172,3 +176,49 @@ (define home-redshift-service-type > (description > "Run Redshift, a program that adjusts the color temperature of displ= ay > according to time of day."))) > + > + > +;;; > +;;; D-Bus. > +;;; > + > +(define-record-type* > + home-dbus-configuration make-home-dbus-configuration > + home-dbus-configuration? > + (dbus home-dbus-dbus ;file-like > + (default dbus)) > + (verbose? home-dbus-verbose? ;boolean Sounds a little missleading as it doesn't control the verbosity of logging, but the logging as a whole. Also, does logging to file work at all when --syslog-only option provided? > + (default #f))) > + > +(define (home-dbus-shepherd-services config) > + (list (shepherd-service > + (documentation "Run the D-Bus daemon in session-specific mode.") > + (provision '(dbus-session)) > + (start #~(make-forkexec-constructor > + (list #$(file-append (home-dbus-dbus config) > + "/bin/dbus-daemon") > + "--nofork" "--session" "--syslog-only" > + (format #f "--address=3Dunix:path=3D~a/bus" > + (or (getenv "XDG_RUNTIME_DIR") > + (format #f "/run/user/~a" > + (getuid))))) > + #$@(if (home-dbus-verbose? config) > + (list #:environment-variables > + #~(list "DBUS_VERBOSE=3D1") > + #:log-file > + (format #f "~a/dbus-daemon.log" > + (or (getenv "XDG_LOG_HOME") > + (format #f "~a/.local/var/lo= g" > + (getenv "HOME"))))) > + '()))) > + (stop #~(make-kill-destructor))))) > + > +(define home-dbus-service-type > + (service-type > + (name 'home-dbus) > + (extensions > + (list (service-extension home-shepherd-service-type > + home-dbus-shepherd-services))) Do we want to extend environment-variables with =2D-8<---------------cut here---------------start------------->8--- '(("DBUS_SESSION_BUS_ADDRESS" . "unix:path=3D$XDG_RUNTIME_DIR/bus")) =2D-8<---------------cut here---------------end--------------->8--- ? > + (default-value (home-dbus-configuration)) > + (description > + "Run the session-specific D-Bus inter-process message bus."))) =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmNGa+sACgkQIgjSCVjB 3rBtDg/+LUO4ET7FJlJuOxf4ExfusiFX2ftczEeoEXxH9N5UeRDBWy3gv9m2+rBl nNdlpAJi0CsZm53AxnfXLiSc1RANa2WRxO1k2kgDKdGfa9vz7hnWmhoqtXxjsUZ6 r2/zjd2Anl7+xzYPzSSfwUlUzkZJ8IKrfASKdeIwS/kAYpwGFTUh58n2Ub4DfBcp meqOCKhsvGq+5woKmIwtWzYpO+08giydOlhh34IxN81coNP/BuiinWprcqMxUexa ENzvyVLt9f+J31cTomHe2YpBTsLaknzOrsf9S0lryEsvEyfmxssbD+IbAmB4oXpH yn3teOzHsH5GoKcFz0dBDHLTLpStTMJHOwJ+A3Qh6xUl1pijt94rFmOs5D7jk+g0 GgOUYJ6PmEg7IzL+t/yP8ubgY+hZV3/oYknv3Oh4fF+gtQdJD9FrfhgQYmpXL1pd FWOI/QSye4UVYyHFzSC1LpO9r+vKVZw1yJCXzXgTHNGz4Hu6AhTFtbetDz7le22A yLdpN75/OWPbuwiQBjKgZajBOJjvNTpVDCOUM/UFOeGZGr0cTzzPauPyh16jR6He wIBCsE94cOcdtV1SEAAX1G41TihyNMWHEgnIBwhD+VxbUsAmgJIXpa12mLbl7WXZ Vpec0y9NzCyQtIsdst+uc8WjRt/X/HmjUJyMiC+Je+cvzFU4d0U= =Tuex -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 12 03:53:16 2022 Received: (at submit) by debbugs.gnu.org; 12 Oct 2022 07:53:16 +0000 Received: from localhost ([127.0.0.1]:55564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiWYF-0007BS-NV for submit@debbugs.gnu.org; Wed, 12 Oct 2022 03:53:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:47868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiWYC-0007BB-2l for submit@debbugs.gnu.org; Wed, 12 Oct 2022 03:53:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiWY9-0006a8-5H for guix-patches@gnu.org; Wed, 12 Oct 2022 03:53:10 -0400 Received: from knopi.disroot.org ([178.21.23.139]:47052) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiWY6-0006gp-UR for guix-patches@gnu.org; Wed, 12 Oct 2022 03:53:08 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 2A3474D65E; Wed, 12 Oct 2022 09:53:04 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5lDYKvmx2Tul; Wed, 12 Oct 2022 09:53:03 +0200 (CEST) Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1665561182; bh=Y4/5iWfNdp33nJoTDFu9rCGT85dXV2nvtFPRazY03Ms=; h=Date:Subject:From:To:References:In-Reply-To; b=EVfLVksiGmrXbalak/2hxdV1xH/250EIUcJOd/CDjpxeXVrvvZz3IMyJb0HYtPq/9 GzLqlLIYmJM+EPrX2+4gvHqt5S0TCao9T5WtFyJXyQ6ZHBAKclIUtnU86NqYvpb9xX o9i8ehPKr/cH6JvlaBNlmc7nEjacem9CJ+Ihkt14PRg17gxhGqsak5NWzccAZvluda pKDGYhLtNgDl4RyZqEMRuv7Ffj1Z2s6JIA0JO6uzKVeF0ig/Q/CZP5jAdBzI+O7rLP 0qQk5y00b3RwbyJQWuM8AUL3R6rF0BKvGtOfuy5KyKybd7JeTDwa9h/+AKvoldfstD Oz8ziQrCStOig== Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 12 Oct 2022 08:53:02 +0100 Message-Id: Subject: Re: [bug#58454] [PATCH 1/1] gnu: home: Add home-dbus-service-type. From: "(" To: "Andrew Tropin" , "( via Guix-patches via" , <58454@debbugs.gnu.org> References: <20221011194513.26008-1-paren@disroot.org> <20221011195430.26160-1-paren@disroot.org> <87ilkpmrkk.fsf@trop.in> In-Reply-To: <87ilkpmrkk.fsf@trop.in> Received-SPF: pass client-ip=178.21.23.139; envelope-from=paren@disroot.org; helo=knopi.disroot.org 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Andrew, On Wed Oct 12, 2022 at 8:25 AM BST, Andrew Tropin wrote: > Sounds a little missleading as it doesn't control the verbosity of > logging, but the logging as a whole. > > Also, does logging to file work at all when --syslog-only option > provided? The system D-Bus service uses ``verbose?'' to turn on logging, and I wanted to keep it consistent. I'm not sure whether ``--syslog-only'' stops logging to the log file, but since system D-Bus uses the flag too, I assumed it doesn't. > Do we want to extend environment-variables with >=20 > --8<---------------cut here---------------start------------->8--- > '(("DBUS_SESSION_BUS_ADDRESS" . "unix:path=3D$XDG_RUNTIME_DIR/bus")) > --8<---------------cut here---------------end--------------->8--- > > ? Oh, I didn't know about that variable. I'll add that, one moment :) -- ( From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 12 04:01:35 2022 Received: (at 58454) by debbugs.gnu.org; 12 Oct 2022 08:01:35 +0000 Received: from localhost ([127.0.0.1]:55577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiWgI-0007PL-Qi for submit@debbugs.gnu.org; Wed, 12 Oct 2022 04:01:35 -0400 Received: from knopi.disroot.org ([178.21.23.139]:57682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiWgG-0007PB-Dj for 58454@debbugs.gnu.org; Wed, 12 Oct 2022 04:01:33 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 04B004DAAE; Wed, 12 Oct 2022 10:01:31 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ypv3HwIrSsfu; Wed, 12 Oct 2022 10:01:29 +0200 (CEST) From: "(" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1665561684; bh=5AxVktMPoiSqsLxJIZIK7ZwlRoE97olvik4dphPSuAE=; h=From:To:Cc:Subject:Date; b=B7aPTHGHtf8hvO2xo6/osHve+7Ltkopr2cIcLY7Vvzq4bMcVpCWplA1dpF+m+1Svn o//ah2KvtUfqYw6+j6y3s2oRxizM/7Fnw9AS+4WrIyOltgB8z5vMVTEPpFk9OEybpt 4Q7ZZOYf120WUh6Ce1FOVKhArt6ZrgwFZn+XeErV8upFf3ekIwKgm4wrgaOnR4t+vK TscjC6W2YoqnE+q8kdlOVtvTyKVkCoYnRb3GrjOGHSYMdne+NT5qy1KrWaYTZYkfSC Vq9+PJXTN/thlK6cBIKoGYq/U/o7krON2YB/SYbpMv51MbukZ8y2HGGpk5qBy+/033 RFfNQxj55eqDQ== To: 58454@debbugs.gnu.org Subject: [PATCH] gnu: home: Add home-dbus-service-type. Date: Wed, 12 Oct 2022 09:01:16 +0100 Message-Id: <20221012080116.4935-1-paren@disroot.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * gnu/home/services/desktop.scm (home-dbus-service-type): New variable. (home-dbus-configuration): New record type. * doc/guix.texi: Document them. --- doc/guix.texi | 17 ++++++++++ gnu/home/services/ [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 FROM_ONE_CHAR Bogus FROM name -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Debbugs-Envelope-To: 58454 Cc: "\(" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) * gnu/home/services/desktop.scm (home-dbus-service-type): New variable. (home-dbus-configuration): New record type. * doc/guix.texi: Document them. --- doc/guix.texi | 17 ++++++++++ gnu/home/services/desktop.scm | 58 ++++++++++++++++++++++++++++++++++- 2 files changed, 74 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 5867acb746..990113703b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41262,6 +41262,23 @@ format. @end deftp +@defvr {Scheme Variable} home-dbus-service-type +This is the service type for running a session-specific D-Bus, for +unprivileged applications that require D-Bus to be running. +@end defvr + +@deftp {Data Type} home-dbus-configuration +The configuration record for @code{home-dbus-service-type}. + +@table @asis +@item @code{dbus} (default: @code{dbus}) +The package providing the @code{/bin/dbus-daemon} command. + +@item @code{verbose?} (default: @code{#f}) +Whether to enable logging. +@end table +@end deftp + @node Guix Home Services @subsection Guix Home Services diff --git a/gnu/home/services/desktop.scm b/gnu/home/services/desktop.scm index b0f4d969b0..20d0724055 100644 --- a/gnu/home/services/desktop.scm +++ b/gnu/home/services/desktop.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2022 Ludovic Courtès +;;; Copyright © 2022 ( ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,7 @@ (define-module (gnu home services desktop) #:use-module (gnu home services) #:use-module (gnu home services shepherd) #:use-module (gnu services configuration) + #:autoload (gnu packages glib) (dbus) #:autoload (gnu packages xdisorg) (redshift) #:use-module (guix records) #:use-module (guix gexp) @@ -27,8 +29,10 @@ (define-module (gnu home services desktop) #:use-module (ice-9 match) #:export (home-redshift-configuration home-redshift-configuration? + home-redshift-service-type - home-redshift-service-type)) + home-dbus-configuration + home-dbus-service-type)) ;;; @@ -172,3 +176,55 @@ (define home-redshift-service-type (description "Run Redshift, a program that adjusts the color temperature of display according to time of day."))) + + +;;; +;;; D-Bus. +;;; + +(define-record-type* + home-dbus-configuration make-home-dbus-configuration + home-dbus-configuration? + (dbus home-dbus-dbus ;file-like + (default dbus)) + (verbose? home-dbus-verbose? ;boolean + (default #f))) + +(define (home-dbus-shepherd-services config) + (list (shepherd-service + (documentation "Run the D-Bus daemon in session-specific mode.") + (provision '(dbus-session)) + (start #~(make-forkexec-constructor + (list #$(file-append (home-dbus-dbus config) + "/bin/dbus-daemon") + "--nofork" "--session" + (format #f "--address=unix:path=~a/bus" + (or (getenv "XDG_RUNTIME_DIR") + (format #f "/run/user/~a" + (getuid))))) + #$@(if (home-dbus-verbose? config) + (list #:environment-variables + #~(list "DBUS_VERBOSE=1") + #:log-file + (format #f "~a/dbus-daemon.log" + (or (getenv "XDG_LOG_HOME") + (format #f "~a/.local/var/log" + (getenv "HOME"))))) + '()))) + (stop #~(make-kill-destructor))))) + +(define (home-dbus-environment-variables config) + '(("DBUS_SESSION_BUS_ADDRESS" + . "unix:path=${XDG_RUNTIME_DIR:-/run/user/$UID}/bus"))) + +(define home-dbus-service-type + (service-type + (name 'home-dbus) + (extensions + (list (service-extension home-shepherd-service-type + home-dbus-shepherd-services) + (service-extension home-environment-variables-service-type + home-dbus-environment-variables))) + (default-value (home-dbus-configuration)) + (description + "Run the session-specific D-Bus inter-process message bus."))) -- 2.38.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 12 04:01:55 2022 Received: (at 58454) by debbugs.gnu.org; 12 Oct 2022 08:01:55 +0000 Received: from localhost ([127.0.0.1]:55581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiWgd-0007Pt-B3 for submit@debbugs.gnu.org; Wed, 12 Oct 2022 04:01:55 -0400 Received: from knopi.disroot.org ([178.21.23.139]:33124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiWgb-0007Pl-Ob for 58454@debbugs.gnu.org; Wed, 12 Oct 2022 04:01:54 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 20CA64DABF; Wed, 12 Oct 2022 10:01:53 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VA9HiutyP2jZ; Wed, 12 Oct 2022 10:01:51 +0200 (CEST) From: "(" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1665561709; bh=5AxVktMPoiSqsLxJIZIK7ZwlRoE97olvik4dphPSuAE=; h=From:To:Cc:Subject:Date; b=N45EF8NCB2KfUdrB5CPpOQ8pAeo3ovovydENKov+EHrSn0yX+dualLwzOF81ATPBQ yKKVSADBvbv1+HnFnIY3q2/hfjn95JoKKD+9jpSUx2v1G6OZDc2pucMZ+h4EhQnO3c R0mtx5W0g4SWX1Y/SpgfXc29o2DMmlnxLnuNITm421tEqSHWuBKVd0dUKo2omq9f0T Lk4PiJJHIxkEj9zcfGRKzuv8oKBhNTX8OSa5GYas/cgiOWuk2du6T/H/hwW/GMb7// 3ejOf8sm2rOD6SKNnLRJ5rBviz4PzfGcQcRNEtV00G15o+AT4GStTwK06MSRxN0qIU 0+Gtk1lYqvbGw== To: 58454@debbugs.gnu.org Subject: [PATCH v2] gnu: home: Add home-dbus-service-type. Date: Wed, 12 Oct 2022 09:01:47 +0100 Message-Id: <20221012080147.4971-1-paren@disroot.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * gnu/home/services/desktop.scm (home-dbus-service-type): New variable. (home-dbus-configuration): New record type. * doc/guix.texi: Document them. --- doc/guix.texi | 17 ++++++++++ gnu/home/services/ [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 FROM_ONE_CHAR Bogus FROM name -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Debbugs-Envelope-To: 58454 Cc: "\(" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) * gnu/home/services/desktop.scm (home-dbus-service-type): New variable. (home-dbus-configuration): New record type. * doc/guix.texi: Document them. --- doc/guix.texi | 17 ++++++++++ gnu/home/services/desktop.scm | 58 ++++++++++++++++++++++++++++++++++- 2 files changed, 74 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 5867acb746..990113703b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41262,6 +41262,23 @@ format. @end deftp +@defvr {Scheme Variable} home-dbus-service-type +This is the service type for running a session-specific D-Bus, for +unprivileged applications that require D-Bus to be running. +@end defvr + +@deftp {Data Type} home-dbus-configuration +The configuration record for @code{home-dbus-service-type}. + +@table @asis +@item @code{dbus} (default: @code{dbus}) +The package providing the @code{/bin/dbus-daemon} command. + +@item @code{verbose?} (default: @code{#f}) +Whether to enable logging. +@end table +@end deftp + @node Guix Home Services @subsection Guix Home Services diff --git a/gnu/home/services/desktop.scm b/gnu/home/services/desktop.scm index b0f4d969b0..20d0724055 100644 --- a/gnu/home/services/desktop.scm +++ b/gnu/home/services/desktop.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2022 Ludovic Courtès +;;; Copyright © 2022 ( ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,7 @@ (define-module (gnu home services desktop) #:use-module (gnu home services) #:use-module (gnu home services shepherd) #:use-module (gnu services configuration) + #:autoload (gnu packages glib) (dbus) #:autoload (gnu packages xdisorg) (redshift) #:use-module (guix records) #:use-module (guix gexp) @@ -27,8 +29,10 @@ (define-module (gnu home services desktop) #:use-module (ice-9 match) #:export (home-redshift-configuration home-redshift-configuration? + home-redshift-service-type - home-redshift-service-type)) + home-dbus-configuration + home-dbus-service-type)) ;;; @@ -172,3 +176,55 @@ (define home-redshift-service-type (description "Run Redshift, a program that adjusts the color temperature of display according to time of day."))) + + +;;; +;;; D-Bus. +;;; + +(define-record-type* + home-dbus-configuration make-home-dbus-configuration + home-dbus-configuration? + (dbus home-dbus-dbus ;file-like + (default dbus)) + (verbose? home-dbus-verbose? ;boolean + (default #f))) + +(define (home-dbus-shepherd-services config) + (list (shepherd-service + (documentation "Run the D-Bus daemon in session-specific mode.") + (provision '(dbus-session)) + (start #~(make-forkexec-constructor + (list #$(file-append (home-dbus-dbus config) + "/bin/dbus-daemon") + "--nofork" "--session" + (format #f "--address=unix:path=~a/bus" + (or (getenv "XDG_RUNTIME_DIR") + (format #f "/run/user/~a" + (getuid))))) + #$@(if (home-dbus-verbose? config) + (list #:environment-variables + #~(list "DBUS_VERBOSE=1") + #:log-file + (format #f "~a/dbus-daemon.log" + (or (getenv "XDG_LOG_HOME") + (format #f "~a/.local/var/log" + (getenv "HOME"))))) + '()))) + (stop #~(make-kill-destructor))))) + +(define (home-dbus-environment-variables config) + '(("DBUS_SESSION_BUS_ADDRESS" + . "unix:path=${XDG_RUNTIME_DIR:-/run/user/$UID}/bus"))) + +(define home-dbus-service-type + (service-type + (name 'home-dbus) + (extensions + (list (service-extension home-shepherd-service-type + home-dbus-shepherd-services) + (service-extension home-environment-variables-service-type + home-dbus-environment-variables))) + (default-value (home-dbus-configuration)) + (description + "Run the session-specific D-Bus inter-process message bus."))) -- 2.38.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 12 06:37:57 2022 Received: (at submit) by debbugs.gnu.org; 12 Oct 2022 10:37:57 +0000 Received: from localhost ([127.0.0.1]:55821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiZ7d-0007Ue-FU for submit@debbugs.gnu.org; Wed, 12 Oct 2022 06:37:57 -0400 Received: from lists.gnu.org ([209.51.188.17]:50292) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiZ7b-0007UW-8b for submit@debbugs.gnu.org; Wed, 12 Oct 2022 06:37:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40338) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiZ7b-0007yg-34 for guix-patches@gnu.org; Wed, 12 Oct 2022 06:37:55 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:32819) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiZ7Y-0006l8-K8 for guix-patches@gnu.org; Wed, 12 Oct 2022 06:37:54 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id 3AD092000E; Wed, 12 Oct 2022 10:37:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1665571066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NM2FpU+wNBimqLY+nSHQBY88gizTtxY4AT2QYYMH7AU=; b=SXZhNr1+MxkG4VI1Ez8s4cxrxQO7ZcOy6nidRWclmqZZDn6CTv0IUV2bQY2D5b/kosq4kQ wb8cNJw84EAIkp0XqiGV87EP9bBlPva7MrQ5cBievrprugbPtEKbO/Q4bexJqPoyTDfV8s PNs7aOzNlk8P9IlMBnYZrYi8EIBykZ0qsIJpv77cHv4sTCjx3ZfPdFI9iF9RBHS7ub4Liv VIovR7F1kxvkJOmjcpBTabsE3e1kWs3NYb2p2EWgwg0oog9mvZCzKZFxEqTH1wB0CzsSpE BDwzhuSlxyWqynOQVjMSXCWxP8CJP+b/hVDjbDBsC5V2zEcQBE2xZsdeQ9asaA== From: Andrew Tropin To: "(" , "( via Guix-patches via" , 58454@debbugs.gnu.org Subject: Re: [bug#58454] [PATCH 1/1] gnu: home: Add home-dbus-service-type. In-Reply-To: References: <20221011194513.26008-1-paren@disroot.org> <20221011195430.26160-1-paren@disroot.org> <87ilkpmrkk.fsf@trop.in> Date: Wed, 12 Oct 2022 14:37:36 +0400 Message-ID: <87czaxmiof.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=217.70.183.200; envelope-from=andrew@trop.in; helo=relay7-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2022-10-12 08:53, ( wrote: > Hi Andrew, > > On Wed Oct 12, 2022 at 8:25 AM BST, Andrew Tropin wrote: >> Sounds a little missleading as it doesn't control the verbosity of >> logging, but the logging as a whole. >> >> Also, does logging to file work at all when --syslog-only option >> provided? > > The system D-Bus service uses ``verbose?'' to turn on logging, and > I wanted to keep it consistent. > I'm not sure whether ``--syslog-only'' stops logging to the log file, > but since system D-Bus uses the flag too, I assumed it doesn't. Can you check it, please? Also, I don't think that we want session dbus output in /var/log/messages and probably we don't need this verbose? field at all and always want to use log-file. > >> Do we want to extend environment-variables with >>=20 >> --8<---------------cut here---------------start------------->8--- >> '(("DBUS_SESSION_BUS_ADDRESS" . "unix:path=3D$XDG_RUNTIME_DIR/bus")) >> --8<---------------cut here---------------end--------------->8--- >> >> ? > > Oh, I didn't know about that variable. I'll add that, one moment :) Actually, it was a question :) It shouldn't break anything and hardcoding this variable should work in most cases, so I think we can keep it for now. > > > -- ( =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmNGmPAACgkQIgjSCVjB 3rCyBg//RHrORxBfVFBaKtavMrMnIvG2EwRClkdCy8wtWUBu4jjZMIc8amE3OTdC 2AM8RF9nhF/t2uAtQ3GvPKwpkPJ/0qmkceKxylfNC8J4YYvz/0wNQlGLJplL6YMM 3Jq6711ec19HL7aul54zt43Wg4WfrSKqW5WWQqqy0yn66xFWa8y8mkszrD0YcNkK +mXiCG5kK8pSeoAbpi6uscMnxjXOUAxIMr4ac5It2WaTVpyk+sr+u8s1awVKtlX7 gJhJsTkEC2PTByd39RwoxaJDXgY31UfoA0eesEwomMdPBzTGW5MO50vbQqIoLvy9 raU38sFDjGLciCK/F+WrWYrLofAGod2IucQVLstcnwKqGwrhD7JlruMnLcBEfa0J Wk/9U0dPxcUKLDtaBiv+SQkYgiXyF1bBmF+jZUEq211xYPwaXjkTWNux5/GA6Pfr SGlwkkkPLVMqGU71Z8QV/PNh0Q/YW6GMJLUnr7mS+AQXFbLP3GX4KQgjWoyCnNk2 u48XASNqUFaLeAeoo8Cl1IkVNZ/9ncnN/X21S+0ZvaOg1n4oCPVTTffpqS/+2eAy l2jaona0OCTTWdw8zZupYhj4GkZNIrd5nxmrv7JsLYBt+e4Ihpk9ezhGZyJKhQhn XRc5TmTjrBGytciLzSRtpApNiUvas8P4nxxm7sXt3uJ2yjljbks= =odqM -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 12 10:57:56 2022 Received: (at 58454) by debbugs.gnu.org; 12 Oct 2022 14:57:56 +0000 Received: from localhost ([127.0.0.1]:58201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oidBE-0008Fr-Ii for submit@debbugs.gnu.org; Wed, 12 Oct 2022 10:57:56 -0400 Received: from knopi.disroot.org ([178.21.23.139]:52074) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oidB3-0008FT-VZ for 58454@debbugs.gnu.org; Wed, 12 Oct 2022 10:57:55 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 5238C4DAAE; Wed, 12 Oct 2022 16:57:44 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Rf0ws-iE37HA; Wed, 12 Oct 2022 16:57:43 +0200 (CEST) Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1665586650; bh=fRyj3nLgJE00/etSR25Vfnhfchg7CeqUrplnmjH3aoQ=; h=Date:Subject:From:To:References:In-Reply-To; b=Dd15B2umC7aGS+gJZdf/VKF+ETBfCXok/Ly1g71iVTeVQ+pxD9wui6DaDEwHWwGM+ eaq2LD7DhRmNLRAK3sDE8KWLy56GIAznE5aXpB7dZWyQlbUwDK/cYQR6UK+9ApsSO8 GzOyS+CkL5r9TbqbKSNDVMyUs1dPJ5RN1ZTeW3Ve4E/gu+hOuJxkJwkb04Wrf5nL24 w1Frym15otb/j0Y+jLaXSXT0HNmAa7XlrGcsy9YxsZayb/tDCZDKWXxJqx+Bua3/uW 715XeWqBKxtfmpH5ZNKqsP1WR5HECeejufjm8+8NQt4UPsqGNi7qXjU15YGa4xn0AF 4+oHbB+ziTbRQ== Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 12 Oct 2022 15:57:29 +0100 Message-Id: Subject: Re: [bug#58454] [PATCH 1/1] gnu: home: Add home-dbus-service-type. From: "(" To: "Andrew Tropin" , "( via Guix-patches via" , <58454@debbugs.gnu.org> References: <20221011194513.26008-1-paren@disroot.org> <20221011195430.26160-1-paren@disroot.org> <87ilkpmrkk.fsf@trop.in> <87czaxmiof.fsf@trop.in> In-Reply-To: <87czaxmiof.fsf@trop.in> X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Wed Oct 12, 2022 at 11:37 AM BST, Andrew Tropin wrote: > Also, I don't think that we want session dbus output in > /var/log/messages and probably we don't need this verbose? field at all > and alwa [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 FROM_ONE_CHAR Bogus FROM name -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Debbugs-Envelope-To: 58454 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) On Wed Oct 12, 2022 at 11:37 AM BST, Andrew Tropin wrote: > Also, I don't think that we want session dbus output in > /var/log/messages and probably we don't need this verbose? field at all > and always want to use log-file. Fair enough; I'll remove ``verbose?'' and add ``--nosyslog''. -- ( From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 12 16:21:51 2022 Received: (at 58454) by debbugs.gnu.org; 12 Oct 2022 20:21:51 +0000 Received: from localhost ([127.0.0.1]:58503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiiEh-00049r-7Z for submit@debbugs.gnu.org; Wed, 12 Oct 2022 16:21:51 -0400 Received: from knopi.disroot.org ([178.21.23.139]:33268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiiEe-00049i-PH for 58454@debbugs.gnu.org; Wed, 12 Oct 2022 16:21:50 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 2E8414DAE3; Wed, 12 Oct 2022 22:21:47 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id erdCwQ4L6kuS; Wed, 12 Oct 2022 22:21:45 +0200 (CEST) From: "(" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1665606105; bh=XjXXUYSL9JuXeWyUBLOhGDSVcOkZLh11+xyf4GoQWYY=; h=From:To:Cc:Subject:Date; b=NW19+dGQH9IvGzVZ67URpi96zHGf1F/MszE2mrj+IBIRtwAZte4sHZNz1cu3Dv1Jd pV59AknIGQ0DEvXfvME3IDXdoJ1WAOtSCTGem5eA9DHQo3q0SGV0tAHGwMhK82DtFd XvnT62gpSckrVMmWN8fOhHzRwXBvWnVRXwDH3ruR8w7ZycYg21Lo6qMqLPv9qrxpDz eL2aWGBjC2fy8tkFGz5O8G3h9yEGs6wElMVIj+O9fbsOmBJeL1MuD8dzZcx1xtSjog WB/GrDwAmCA6uV7j5s8qg3K+SjpDHhtBaAN4py84XYOvvLhXth8kUE6eU9RYwTMu+T 0vStxBmp47Acg== To: 58454@debbugs.gnu.org Subject: [PATCH v3] gnu: home: Add home-dbus-service-type. Date: Wed, 12 Oct 2022 21:21:39 +0100 Message-Id: <20221012202139.8379-1-paren@disroot.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * gnu/home/services/desktop.scm (home-dbus-service-type): New variable. (home-dbus-configuration): New record type. * doc/guix.texi: Document them. --- doc/guix.texi | 14 +++++++++ gnu/home/services/d [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 FROM_ONE_CHAR Bogus FROM name -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Debbugs-Envelope-To: 58454 Cc: "\(" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) * gnu/home/services/desktop.scm (home-dbus-service-type): New variable. (home-dbus-configuration): New record type. * doc/guix.texi: Document them. --- doc/guix.texi | 14 +++++++++ gnu/home/services/desktop.scm | 54 ++++++++++++++++++++++++++++++++++- 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 5867acb746..78ada9c301 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41262,6 +41262,20 @@ format. @end deftp +@defvr {Scheme Variable} home-dbus-service-type +This is the service type for running a session-specific D-Bus, for +unprivileged applications that require D-Bus to be running. +@end defvr + +@deftp {Data Type} home-dbus-configuration +The configuration record for @code{home-dbus-service-type}. + +@table @asis +@item @code{dbus} (default: @code{dbus}) +The package providing the @code{/bin/dbus-daemon} command. +@end table +@end deftp + @node Guix Home Services @subsection Guix Home Services diff --git a/gnu/home/services/desktop.scm b/gnu/home/services/desktop.scm index b0f4d969b0..1f41ace766 100644 --- a/gnu/home/services/desktop.scm +++ b/gnu/home/services/desktop.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2022 Ludovic Courtès +;;; Copyright © 2022 ( ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,7 @@ (define-module (gnu home services desktop) #:use-module (gnu home services) #:use-module (gnu home services shepherd) #:use-module (gnu services configuration) + #:autoload (gnu packages glib) (dbus) #:autoload (gnu packages xdisorg) (redshift) #:use-module (guix records) #:use-module (guix gexp) @@ -27,8 +29,10 @@ (define-module (gnu home services desktop) #:use-module (ice-9 match) #:export (home-redshift-configuration home-redshift-configuration? + home-redshift-service-type - home-redshift-service-type)) + home-dbus-configuration + home-dbus-service-type)) ;;; @@ -172,3 +176,51 @@ (define home-redshift-service-type (description "Run Redshift, a program that adjusts the color temperature of display according to time of day."))) + + +;;; +;;; D-Bus. +;;; + +(define-record-type* + home-dbus-configuration make-home-dbus-configuration + home-dbus-configuration? + (dbus home-dbus-dbus ;file-like + (default dbus))) + +(define (home-dbus-shepherd-services config) + (list (shepherd-service + (documentation "Run the D-Bus daemon in session-specific mode.") + (provision '(dbus-session)) + (start #~(make-forkexec-constructor + (list #$(file-append (home-dbus-dbus config) + "/bin/dbus-daemon") + "--nofork" "--session" "--nosyslog" + (format #f "--address=unix:path=~a/bus" + (or (getenv "XDG_RUNTIME_DIR") + (format #f "/run/user/~a" + (getuid))))) + #:environment-variables + #~(list "DBUS_VERBOSE=1") + #:log-file + (format #f "~a/dbus-daemon.log" + (or (getenv "XDG_LOG_HOME") + (format #f "~a/.local/var/log" + (getenv "HOME")))))) + (stop #~(make-kill-destructor))))) + +(define (home-dbus-environment-variables config) + '(("DBUS_SESSION_BUS_ADDRESS" + . "unix:path=${XDG_RUNTIME_DIR:-/run/user/$UID}/bus"))) + +(define home-dbus-service-type + (service-type + (name 'home-dbus) + (extensions + (list (service-extension home-shepherd-service-type + home-dbus-shepherd-services) + (service-extension home-environment-variables-service-type + home-dbus-environment-variables))) + (default-value (home-dbus-configuration)) + (description + "Run the session-specific D-Bus inter-process message bus."))) -- 2.38.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 13 01:22:59 2022 Received: (at submit) by debbugs.gnu.org; 13 Oct 2022 05:22:59 +0000 Received: from localhost ([127.0.0.1]:58956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiqgN-0007WL-5M for submit@debbugs.gnu.org; Thu, 13 Oct 2022 01:22:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:60824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiqgL-0007W8-3R for submit@debbugs.gnu.org; Thu, 13 Oct 2022 01:22:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38426) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiqgK-0001HS-Un for guix-patches@gnu.org; Thu, 13 Oct 2022 01:22:56 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:58811) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiqgI-0001uV-Be for guix-patches@gnu.org; Thu, 13 Oct 2022 01:22:56 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id 368E3100004; Thu, 13 Oct 2022 05:22:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1665638571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=N5ls8QvFKxHe3ZD9XL006k5eT29NMEp43XTO0nob8a8=; b=C8+KZbs8f3LfShpZvGjavJn2GfHQq/EqjnsGtUIIQvEaNEcXwQ9ik4hr1xDfqS37iI34wA YY2zCf6GDAD3U24ktLLFUOzmuxubuQcElwk5ahMYtmcnuwnrecY1TJ1RoH4cWou48NgG1q sHmYFUOXMxrCCnGdm+fEoLEsbU009DvxdzmKnmdqoqhcl3xJwJal/m9UzBd7m9yq5D8sFa 5G8pvdooGzl+rbhdpSN2snYugdmmdBKE5XOSOEgqpqgLu/InC85jXQnfq3N9myAPIksbbA PPyQScxb93iDzngcy2UDIKJdAX97aLutdmzkDh4fUWnygZ5JrVH5qkzQThw+SA== From: Andrew Tropin To: "( via Guix-patches via" , 58454@debbugs.gnu.org Subject: Re: [bug#58454] [PATCH v3] gnu: home: Add home-dbus-service-type. In-Reply-To: <20221012202139.8379-1-paren@disroot.org> References: <20221011194513.26008-1-paren@disroot.org> <20221012202139.8379-1-paren@disroot.org> Date: Thu, 13 Oct 2022 09:22:33 +0400 Message-ID: <87y1tkcn6u.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=217.70.178.231; envelope-from=andrew@trop.in; helo=relay11.mail.gandi.net X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit Cc: "\(" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2022-10-12 21:21, "\( via Guix-patches" via wrote: > * gnu/home/services/desktop.scm (home-dbus-service-type): New > variable. > (home-dbus-configuration): New record type. > * doc/guix.texi: Document them. > --- > doc/guix.texi | 14 +++++++++ > gnu/home/services/desktop.scm | 54 ++++++++++++++++++++++++++++++++++- > 2 files changed, 67 insertions(+), 1 deletion(-) > > diff --git a/doc/guix.texi b/doc/guix.texi > index 5867acb746..78ada9c301 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -41262,6 +41262,20 @@ format. >=20=20 > @end deftp >=20=20 > +@defvr {Scheme Variable} home-dbus-service-type > +This is the service type for running a session-specific D-Bus, for > +unprivileged applications that require D-Bus to be running. > +@end defvr > + > +@deftp {Data Type} home-dbus-configuration > +The configuration record for @code{home-dbus-service-type}. > + > +@table @asis > +@item @code{dbus} (default: @code{dbus}) > +The package providing the @code{/bin/dbus-daemon} command. > +@end table > +@end deftp > + > @node Guix Home Services > @subsection Guix Home Services >=20=20 > diff --git a/gnu/home/services/desktop.scm b/gnu/home/services/desktop.scm > index b0f4d969b0..1f41ace766 100644 > --- a/gnu/home/services/desktop.scm > +++ b/gnu/home/services/desktop.scm > @@ -1,5 +1,6 @@ > ;;; GNU Guix --- Functional package management for GNU > ;;; Copyright =C2=A9 2022 Ludovic Court=C3=A8s > +;;; Copyright =C2=A9 2022 ( > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -20,6 +21,7 @@ (define-module (gnu home services desktop) > #:use-module (gnu home services) > #:use-module (gnu home services shepherd) > #:use-module (gnu services configuration) > + #:autoload (gnu packages glib) (dbus) > #:autoload (gnu packages xdisorg) (redshift) > #:use-module (guix records) > #:use-module (guix gexp) > @@ -27,8 +29,10 @@ (define-module (gnu home services desktop) > #:use-module (ice-9 match) > #:export (home-redshift-configuration > home-redshift-configuration? > + home-redshift-service-type >=20=20 > - home-redshift-service-type)) > + home-dbus-configuration > + home-dbus-service-type)) >=20=20 > > ;;; > @@ -172,3 +176,51 @@ (define home-redshift-service-type > (description > "Run Redshift, a program that adjusts the color temperature of displ= ay > according to time of day."))) > + > + > +;;; > +;;; D-Bus. > +;;; > + > +(define-record-type* > + home-dbus-configuration make-home-dbus-configuration > + home-dbus-configuration? > + (dbus home-dbus-dbus ;file-like > + (default dbus))) > + > +(define (home-dbus-shepherd-services config) > + (list (shepherd-service > + (documentation "Run the D-Bus daemon in session-specific mode.") > + (provision '(dbus-session)) Changed it to just dbus. > + (start #~(make-forkexec-constructor > + (list #$(file-append (home-dbus-dbus config) > + "/bin/dbus-daemon") > + "--nofork" "--session" "--nosyslog" Removed --nosyslog. > + (format #f "--address=3Dunix:path=3D~a/bus" > + (or (getenv "XDG_RUNTIME_DIR") > + (format #f "/run/user/~a" > + (getuid))))) > + #:environment-variables > + #~(list "DBUS_VERBOSE=3D1") > + #:log-file > + (format #f "~a/dbus-daemon.log" Changed it to dbus.log. > + (or (getenv "XDG_LOG_HOME") > + (format #f "~a/.local/var/log" > + (getenv "HOME")))))) > + (stop #~(make-kill-destructor))))) > + > +(define (home-dbus-environment-variables config) > + '(("DBUS_SESSION_BUS_ADDRESS" > + . "unix:path=3D${XDG_RUNTIME_DIR:-/run/user/$UID}/bus"))) > + > +(define home-dbus-service-type > + (service-type > + (name 'home-dbus) > + (extensions > + (list (service-extension home-shepherd-service-type > + home-dbus-shepherd-services) > + (service-extension home-environment-variables-service-type > + home-dbus-environment-variables))) > + (default-value (home-dbus-configuration)) > + (description > + "Run the session-specific D-Bus inter-process message bus."))) Applied with small adjustments mentioned above, will push soon, thank you for the patch. Now I can also close the TODO in rde :) https://git.sr.ht/~abcdw/rde/tree/111130ebf3ef4a9143186604c054aeb807a84063/= rde/features/base.scm#L305 =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmNHoJkACgkQIgjSCVjB 3rByLg//TkBpBGQb0/GBBM3Txq2MB4D9iyXiErHjiId/qeGL54yb41gPocnO9ZZU j3CJAEq8zFAoAf2dGAwyut4j7kYc2z4LEO60Cs6NTTOZU4kYHYTI7m1Xp6dMGLsF eZPDNOXoxY/ICof/fxQOb5+eUqMWDRcSD3Jo+T9nOXCbW6J4RS4b+YfulcoZuo7Z K2Oy2Fly70Frd3ZM0TQv3PgZU4qlkVyoJc8YtlZt0zo0LAoKuw/4I4AyJSVsOOV+ 9MSM3O68BO51G66tMvbrW2OtRwLguwVfEr1m8mmeuqha+S6P6CjNgXGu6qX82W1I q8jwT7wFVKe2WAK5nofGcBLShj/yXnb4BNzMC8GoeeEhJzH3t30XtuhdjQhpKgpK GCR+MLknWjJAjqMS9/nD6rFcT2vzguqjsV2875D8aHsCM+mvtIRJh1zkAHVrGCLu PekQT3kx0eTROT+59FlhZ7Gq/4o//3JK81EvH/QbUjA07Un+lCyRufMmXOMlHJxj cIAzk1yH1UO+X2Xw2+9k7svzqUEdqcBu4hWAcCNuzfqJL8czfMMkIaWRElVeUi36 ZmZfb3CNJWD5Y6ab0FaCRUO7CXm7nK3GwtlUj5BcGjsqg/rdnagrdAhaup6YELtr 6pGVi29bLOEr9CgRSee17MFizWt5ML9tD7kMG9MQjdUsIHtmo9o= =6Sw5 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 13 02:10:19 2022 Received: (at submit) by debbugs.gnu.org; 13 Oct 2022 06:10:19 +0000 Received: from localhost ([127.0.0.1]:59039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oirQB-0000QV-Gz for submit@debbugs.gnu.org; Thu, 13 Oct 2022 02:10:19 -0400 Received: from lists.gnu.org ([209.51.188.17]:48418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oirQ7-0000QM-Lm for submit@debbugs.gnu.org; Thu, 13 Oct 2022 02:10:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oirQ6-0007ra-HM for guix-patches@gnu.org; Thu, 13 Oct 2022 02:10:15 -0400 Received: from knopi.disroot.org ([178.21.23.139]:54024) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oirQ5-0000bp-5x for guix-patches@gnu.org; Thu, 13 Oct 2022 02:10:14 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 52C4A4DAB3; Thu, 13 Oct 2022 08:10:11 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MhwzKM2HxHEL; Thu, 13 Oct 2022 08:10:10 +0200 (CEST) Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1665641409; bh=lwH06QAM3q4AnacJSkqApeVgMVfVB5Du8JvudZrisCM=; h=Date:To:Subject:From:References:In-Reply-To; b=LMcGjGHvIWSxB94TUQKL60Mw5vTF6ytiU2CqJNReY1psyPDzJX5p8/UEyxtoFQAsU G3DkuU39+K1Z1M6qPWnIswGNZ3h8jlLZ66CaRo/YUG0JWOQDXfzGSMdK5WM3YDYE8u 9e6Q/unaTBLgbxOx8xyB4YmGCZLMwmFpr0oWXVAacmWB6tBBd206E6PqUl3SsB4CtG nvO3QjkzscN5tNNu4OAwiH3u3y5sTsvDmNGwOBsuJsjxNOnIU3ebbczVZ1KAX7BWuY bnejRuHCFq71DwUlVRMTty4HpCPGJwDeejZt0OpnKmtMSZ60S5VNDnA2eYrdtesWI4 jlmYUf4a4IkRQ== Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 13 Oct 2022 07:10:09 +0100 Message-Id: To: "Andrew Tropin" , "( via Guix-patches via" , <58454@debbugs.gnu.org> Subject: Re: [bug#58454] [PATCH v3] gnu: home: Add home-dbus-service-type. From: "(" References: <20221011194513.26008-1-paren@disroot.org> <20221012202139.8379-1-paren@disroot.org> <87y1tkcn6u.fsf@trop.in> In-Reply-To: <87y1tkcn6u.fsf@trop.in> Received-SPF: pass client-ip=178.21.23.139; envelope-from=paren@disroot.org; helo=knopi.disroot.org X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PYZOR_CHECK=1.392, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Thanks! -- ( From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 13 02:48:33 2022 Received: (at control) by debbugs.gnu.org; 13 Oct 2022 06:48:33 +0000 Received: from localhost ([127.0.0.1]:59198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ois1B-0003kg-0X for submit@debbugs.gnu.org; Thu, 13 Oct 2022 02:48:33 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:43599) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ois19-0003kR-BZ for control@debbugs.gnu.org; Thu, 13 Oct 2022 02:48:32 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id 806E3E0002 for ; Thu, 13 Oct 2022 06:48:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1665643704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=XfIygcBBtSGOwAZsPv0hYvyh29D7PvHGZx+Sbznh+Ek=; b=MoFvvsC0RDn6gTzXiFeIXc5fFmj5dcBi4cA7QpLcvBrLcqtPbez24qMZjCjPqpwVt7d8tb SwgERfwi9t/KpOU6MqJ+/RmPthBqzH6lbtCEjT32gUtIZ/4kYVwVjr/UNdHhiERArACeri PoUvt0P79ZPkN5gazPViaVkgiJSaagsuAaKM3oV13ZO/7lLcwG5i736Pg4GwYTot2lrNYJ ON1K/L6FKcGtXYyUdjDU1SVxP05v/iPigTKsf6g3ixgUhAKtu2qePpUVEni9jsouLyIDOt ZHcXyYIfzZMK2GjminDVIGF481wwRIZkTLgbjIFntwIu2X/LXnhdr5R0a+NgQg== From: Andrew Tropin To: control@debbugs.gnu.org Subject: Applied Date: Thu, 13 Oct 2022 10:47:58 +0400 Message-ID: <875ygocj8h.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain close 58454 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmNHtJ8ACgkQIgjSCVjB 3rBB6xAAhw3szQAtt1JDJJ8097Oai419xkosUdESattCdkx9LSIbCpTD1QlbrAqj 0djpAOg5WSr6jBq4Ka2Hs55WSsLYOLoYZ5LDMazyWPvOO1MtV8RUYkFqJgDORhaz LKbRuC1tr0Iu0sgOZgDHQpcHu8xdhmXmmo/SbNGA/Z2UpvCEWmVR6av8Fi/YUwE6 Ityg61nSR50htTSsdSlGkudU6djCpbU5Ilkrm3CprcizWaL4YKt0CWYVnQgtXVQI bqdFmakrH5gDL8xvnUf5zbpE5f0EwqWgqoL5RiJMaDAYhMLiV3M1wRYGuILUAgUq U+/szgFGJaioC7QBLjnpqyjW3SPtQy04Ubu3Kez0Bh8wy3CwuLFWxZJzhwfgKVjW 0L694+fXTCnP/SvA5iaqH1UpOo7SmN4efL6PG43ewqP/3RHPVM7PIAQUYE0tsete XiSvtDZvXR1cNhYHUnRw94t783ayoeJOtyw1CmAZ7+e9TooYh9Dgf7iRLzZLQbWT bC0xPOzXxYKb31kEy6jrGXVvxOqEDf2Cp/WvSmyvsBLt+0Anx7beeepnRQt7TTjF Zxabo6RGxX+pZE24aZcxsu/QxE5xYqT9vggokDJZ/xXvfW5PlstAZziXDW2L9LQQ nWUIW15NwF/3GXvg6zF5zzTOqlw/aG0JUzgj29DLQsEtWMyP0Ms= =R3ex -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 14 11:15:25 2022 Received: (at 58454) by debbugs.gnu.org; 14 Oct 2022 15:15:26 +0000 Received: from localhost ([127.0.0.1]:38337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojMPF-0006dW-Kc for submit@debbugs.gnu.org; Fri, 14 Oct 2022 11:15:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojMPD-0006dI-5B for 58454@debbugs.gnu.org; Fri, 14 Oct 2022 11:15:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58418) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojMP7-0007sA-U9; Fri, 14 Oct 2022 11:15:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=HXim7Sox78hOuocvLL1xMX95peDfGbkIpQsOUKvECp8=; b=gsTnua38N8C24t+USd+1 VVyHihLpwaBYx8iGqmbYGv+9W+WRAqk8eTVXdylZuqSeaJYNkfb2Tpi4Z7Suw+HGEAFVowvK0jt/O wWKk3xx+P2BU6AVOrwS2uFlKvH0i+OtRDy6J0BBCX8fWOpRbVUJWW6Y9DPR7NU1fnQ/MzeigEiM2H l+yAvME55lFJ/LvzXqkVUxXnLjjMZQUzmnSe+iHk89ZuPC25X6y7k8qlATZ074X93Tox4cXq2gqLX K3l99z49auwCBU0+N5VtItq6eCqw1ckbZZLLTkotKVawHBZRKXkX22b7RIRj4mLpMRKfrywaaYBr/ vbTbLNplU1nZDQ==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=56008 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojMP6-0006X4-PP; Fri, 14 Oct 2022 11:15:17 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "(" Subject: Re: bug#58454: [PATCH 0/1] gnu: home: Add home-dbus-service-type. References: <20221011194513.26008-1-paren@disroot.org> Date: Fri, 14 Oct 2022 17:15:14 +0200 In-Reply-To: <20221011194513.26008-1-paren@disroot.org> (paren@disroot.org's message of "Tue, 11 Oct 2022 20:45:13 +0100") Message-ID: <87a65yl9ml.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58454 Cc: 58454@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! "(" skribis: > This patch adds a home service for running D-Bus in session mode. It's > a prerequisite for the ``home-mako-service-type'' I'm writing, as Mako > requires a session D-Bus daemon to be running so that it can receive > notifications. Isn=E2=80=99t the session bus automatically started on demand? I don=E2=80= =99t remember having to run it explicitly, but maybe it=E2=80=99s because GDM does it for= me? In any case, it would be nice in the manual to document when =E2=80=98home-dbus-service-type=E2=80=99 is useful; it doesn=E2=80=99t seem= useful for me with GDM + EXWM at least. Thoughts? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 14 15:20:08 2022 Received: (at 58454) by debbugs.gnu.org; 14 Oct 2022 19:20:08 +0000 Received: from localhost ([127.0.0.1]:38643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojQE4-0005BT-89 for submit@debbugs.gnu.org; Fri, 14 Oct 2022 15:20:08 -0400 Received: from knopi.disroot.org ([178.21.23.139]:45826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojQE1-0005BJ-2D for 58454@debbugs.gnu.org; Fri, 14 Oct 2022 15:20:06 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id CB0724DAA1; Fri, 14 Oct 2022 21:20:03 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with UTF8SMTP id BDNU2RmYOZmx; Fri, 14 Oct 2022 21:20:02 +0200 (CEST) Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1665775200; bh=a61YHPkL/RqwvXjCqzRtmQ21fLdG/6QWCz1B2DohvGw=; h=Date:Cc:Subject:From:To:References:In-Reply-To; b=IScFvE3klpxsWSAzTv2iGneFy8dj2bTYr8Qh/+SCyaPn4l4FskXWm2pLU0MjgTTln k/0KvqPGnv1ulmK0Y8Q1dsmMDbhhzn4/+9gWfNZd3B1rorHLLirXrqezjtn0Do+ln5 gAOOyMOMw/uG3yjoXv+feiSygdr2F3J1cdU4R2nWuBnwMp/uv3mcBRv+i82pCCbcN4 cPdAKW57UsRCd0tbudnEC0zcVpbzGJbyAB7fyOOHTyXVbNSxaOkC3K7xOmYE9Nolb5 biXDB2AprwNq5kGuRMC/bMg1ypfIBzlOJOz/+b2MGV18E6Cukw+jbHNG1Q6RFqYcKc 59uIKmRfuc+Ng== Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 14 Oct 2022 20:19:59 +0100 Message-Id: Subject: Re: bug#58454: [PATCH 0/1] gnu: home: Add home-dbus-service-type. From: "(" To: =?utf-8?q?Ludovic_Court=C3=A8s?= References: <20221011194513.26008-1-paren@disroot.org> <87a65yl9ml.fsf@gnu.org> In-Reply-To: <87a65yl9ml.fsf@gnu.org> X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hey, On Fri Oct 14, 2022 at 4:15 PM BST, Ludovic Courtès wrote: > Isn’t the session bus automatically started on demand? I don’t remember > having to run it explicitly, but maybe it’s because GDM do [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 FROM_ONE_CHAR Bogus FROM name -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Debbugs-Envelope-To: 58454 Cc: 58454@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) Hey, On Fri Oct 14, 2022 at 4:15 PM BST, Ludovic Court=C3=A8s wrote: > Isn=E2=80=99t the session bus automatically started on demand? I don=E2= =80=99t remember > having to run it explicitly, but maybe it=E2=80=99s because GDM does it f= or me? > > In any case, it would be nice in the manual to document when > =E2=80=98home-dbus-service-type=E2=80=99 is useful; it doesn=E2=80=99t se= em useful for me with > GDM + EXWM at least. Yeah, I think complex login managers like GDM do start it automatically, bu= t simpler things like greetd don't. -- ( From unknown Tue Aug 19 12:51:06 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 12 Nov 2022 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator