From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id YDdmL161C2ciNgEAqHPOHw:P1 (envelope-from ) for ; Sun, 13 Oct 2024 11:56:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id YDdmL161C2ciNgEAqHPOHw (envelope-from ) for ; Sun, 13 Oct 2024 13:56:14 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="CaseN4/C"; dkim=fail ("headers rsa verify failed") header.d=fabionatali.com header.s=gm1 header.b=c3M6ei6g; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1728820574; a=rsa-sha256; cv=none; b=tYTk/mp3ZC+iim6rhnp5hn6N42aPlxlxbmHfruqzhCv1r+NIp9HU484o/yxaSSQvXSO47z 5Ns5/k9DV8DrKco7qOVs2a8kmza/DXpq3b2teFPTL0gmN0BbDe0Py0wb/Y9Uss3YAq8w4n X/I6J2PanaGH3vmjc+KI0uqFVaZQHZk6kThzQzqa/iTKFRaBvE+zTElty4b5j+xukIGDzM DvhQCJKQd6BZFxxxnkCZBuPf3fuEMwd3exoLcaGMhIvLR/oA416EgapqGuB+odz2AHPuCg glxTAzhCNfLijYTb5REf0oqKVauA8nxoM/XxD0DuIL4nu+cWiLPCa72kVJa+8Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="CaseN4/C"; dkim=fail ("headers rsa verify failed") header.d=fabionatali.com header.s=gm1 header.b=c3M6ei6g; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1728820574; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=kkYM7NIVVxO68VS02jj73hIuUQvkG9d7m+SWzHPve6o=; b=YttwpI8zAz6udqYp0xpTVZ47+xDoMI6w+o99LPuwHmnZXMl/Duy3goYjzUFO/TcdPMsDwv Iu65yt4lsztxlDaRkGyoqs6O8mM4Gw4zpl2jydX2dCxgU3+ZgfCne9NQ2sGvDygp1cKgwz ZuNdXK4b442uDWm6yG4eY1EzWdWTFdfXsM+s00p98qxlmqZdRAr8LU4ybRbL89MnHWUsea WHLJHG+TitBQuhrS3ZVepiTJGoL+yWsfA+YCEFGch2nsPK+Cy0FKtKQfx0zE+kB3h1YBfX NAAcwKBBpxRG8L7DR2UM0IQMPVKOrXOdn5+SDBOS9FfWptyipWooBUtuwfEYDg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A947270012 for ; Sun, 13 Oct 2024 13:56:13 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szxCP-0003rb-Ip; Sun, 13 Oct 2024 07:55:50 -0400 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 1szxCN-0003r6-CV for guix-patches@gnu.org; Sun, 13 Oct 2024 07:55:47 -0400 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 1szxCN-0000yB-3U for guix-patches@gnu.org; Sun, 13 Oct 2024 07:55:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=kkYM7NIVVxO68VS02jj73hIuUQvkG9d7m+SWzHPve6o=; b=CaseN4/CdyqAintw6nj6UCSabRbwPcI29Bi0bxVQv5iayzcjTJIz8T2mFYhfyyieJBBSuHcQfNuxZaL7GlIhVSTNnybCRb8wynvIeGqK4xTVof+R3vXgSpXQ9nIG0CJvDY+rnTxDlfesjB8hAKZNJ5gpdeetfZJaeN0UveTxIUDxcZF392X0EkjkzyTM3pB30jDkn0akaeGsMEmRF+ui7elksf5YjkPBRenlDaqB/VZhZPwIS99ccebw4LRBm8+t0Fkc1emQ0zRgyqv3xGLFuN7v1IfgBVuC3CZzHPmRhbhfk1WCoj5t57GouRI72BsE9RD3fPFrrhrx3Weo+tTJ5w==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1szxCc-0005i1-6n for guix-patches@gnu.org; Sun, 13 Oct 2024 07:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73788] [PATCH] home: services: Fix 'home-unclutter-service-type'. Resent-From: Fabio Natali Original-Sender: "Debbugs-submit" Resent-CC: , guix-patches@gnu.org Resent-Date: Sun, 13 Oct 2024 11:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73788 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73788@debbugs.gnu.org Cc: Fabio Natali , ( , Andrew Tropin , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Tanguy Le Carrour X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: ( , Andrew Tropin , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Tanguy Le Carrour Received: via spool by submit@debbugs.gnu.org id=B.172882053021887 (code B ref -1); Sun, 13 Oct 2024 11:56:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 Oct 2024 11:55:30 +0000 Received: from localhost ([127.0.0.1]:50454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szxC6-0005gw-7l for submit@debbugs.gnu.org; Sun, 13 Oct 2024 07:55:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:38072) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szxC3-0005gi-Lo for submit@debbugs.gnu.org; Sun, 13 Oct 2024 07:55:28 -0400 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 1szxBn-0003oN-Ja for guix-patches@gnu.org; Sun, 13 Oct 2024 07:55:11 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1szxBk-0000tv-SX for guix-patches@gnu.org; Sun, 13 Oct 2024 07:55:11 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 78C0640005; Sun, 13 Oct 2024 11:55:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fabionatali.com; s=gm1; t=1728820503; 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: content-transfer-encoding:content-transfer-encoding; bh=kkYM7NIVVxO68VS02jj73hIuUQvkG9d7m+SWzHPve6o=; b=c3M6ei6gtIhrLQoflwacBhHEIeSeqaoW9YkRusg4TrIZ/8y3Sm+aoIIjpaLHlxlitikvVx C1baeunR0Tl9h3pUSLqdrfk7EhYxijVx4dMbNzlo3jIibzHJR5+BRhYTnj4egCu2Na33i9 Njgt6tKQxCnwZiZDn8tfntXi+9CmJOZT8mO1JPsBf3hPMPHANySwOinpwpjOmHNSUmIEmZ KFb748h3o+gri/JQleHkf0DyPld5pyBbr0lSvysMuO5H65KxpXk5a/FI8rJXEyrAaSRxPo rk37SD5NSJWiMd2HDr4uIMy8rDciuqNVxDV62gocvVLL7FeSHy6lexI2zMDJGw== Date: Sun, 13 Oct 2024 12:45:29 +0100 Message-ID: X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: me@fabionatali.com Received-SPF: pass client-ip=217.70.183.194; envelope-from=me@fabionatali.com; helo=relay2-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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Reply-to: Fabio Natali X-ACL-Warn: , Fabio Natali via Guix-patches From: Fabio Natali via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.64 X-Spam-Score: -3.64 X-Migadu-Queue-Id: A947270012 X-Migadu-Scanner: mx10.migadu.com X-TUID: FYw+1MryeifK * gnu/home/services/desktop.scm: Add DISPLAY to the list of environment variables passed to 'home-unclutter-service-type'. Change 'make-forkexec-construstor' to 'fork+exec-command' as the former did not seem to pick up the newly defined environment variable. Add 'x11-display' as a requirement. These changes are consistent to how things are done in 'home-redshift-service-type'. Change-Id: Ie8b88b30353e76139d354da27aef791036eaa5a0 --- Hi All. 👋 This is to fix an issue with 'home-unclutter-service-type' where the 'DISPLAY' environment variable was not passed to the service. Without this patch, on my system the service fails reporting the following error message in the logs: 'unclutter: could not open display'. This patch mirrors how things are handled in the 'home-redshift-service-type' service, so hopefully it's fine. Let me know what you think. Thanks, cheers, Fabio. gnu/home/services/desktop.scm | 38 ++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/gnu/home/services/desktop.scm b/gnu/home/services/desktop.scm index 679ba31c0f..dc9de168b7 100644 --- a/gnu/home/services/desktop.scm +++ b/gnu/home/services/desktop.scm @@ -349,21 +349,31 @@ (define (home-unclutter-shepherd-service config) (list (shepherd-service (provision '(unclutter)) - (requirement '()) + ;; Depend on 'x11-display', which sets 'DISPLAY' if an X11 server is + ;; available, and fails to start otherwise. + (requirement '(x11-display)) + (modules '((srfi srfi-1) + (srfi srfi-26))) (one-shot? #t) - (start #~(make-forkexec-constructor - (list - #$(file-append - (home-unclutter-configuration-unclutter config) - "/bin/unclutter") - "-idle" - (number->string - #$(home-unclutter-configuration-idle-timeout config))) - #:log-file (string-append - (or (getenv "XDG_STATE_HOME") - (format #f "~a/.local/state" - (getenv "HOME"))) - "/log/unclutter.log")))))) + (start #~(lambda _ + (fork+exec-command + (list + #$(file-append + (home-unclutter-configuration-unclutter config) + "/bin/unclutter") + "-idle" + (number->string + #$(home-unclutter-configuration-idle-timeout config))) + ;; Inherit the 'DISPLAY' variable set by 'x11-display'. + #:environment-variables + (cons (string-append "DISPLAY=" (getenv "DISPLAY")) + (remove (cut string-prefix? "DISPLAY=" <>) + (default-environment-variables))) + #:log-file (string-append + (or (getenv "XDG_STATE_HOME") + (format #f "~a/.local/state" + (getenv "HOME"))) + "/log/unclutter.log"))))))) (define home-unclutter-service-type (service-type base-commit: e4f5eb6c01727ef143e533019e74830e00d6f5d2 -- 2.46.0